Search found 5 matches

by jocker1
Thu May 24, 2012 10:17 am
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 27781

Re: 11462 - Ages Sort

How to output this code....... cause i got PE... plz could any one help me...

#include <algorithm>
#include <iostream>
#include <vector>
#include <cstring>

using namespace std;

int main(){
vector<int> mvector;
vector<int>::iterator it;
unsigned int ncases;
int numbers;
while(cin>>ncases ...
by jocker1
Wed May 23, 2012 9:43 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101941

Re: 10035 - Primary Arithmetic... Why I got WA???

ohhhhhhhhhhhh i realized a stupid mistake in my code....
Thanks again brian.....
by jocker1
Wed May 23, 2012 9:31 am
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 51176

Re: 371 - Ackermann Functions... Why WA????

Yeah you were right brian, i forgot that case completely....
Thanks a lot brianfry problem AC.......
by jocker1
Sat May 19, 2012 11:45 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 51176

371 - Ackermann Functions... Why WA????

#include <iostream>
#include <algorithm>
using namespace std;
unsigned long long calculate(unsigned long long n);
int main(){
unsigned long long a,b,d,count,c;
while(cin>>a>>b){
if(a==0 && b==0) break;
if(a>b)
swap(a,b);
d=0;
c=0;
for(long long i=a;i<=b;i++)
{
count = calculate(i);
if(d ...
by jocker1
Sat May 19, 2012 11:30 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 101941

10035 - Primary Arithmetic... Why I got WA???

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
unsigned long long a,b,c,d,sum,carrier,count;
while(cin>>a>>b){
if(a==0 && b==0) break;
sum=0;
carrier=0;
count=0;
while(a!=0 || b!=0)
{
c=a%10;
d=b%10;
sum=c+d+carrier;
if(sum>9)
count++;
carrier=sum/10;
a=a ...

Go to advanced search