Search found 6 matches

by anik.bit0104
Tue May 03, 2011 3:43 pm
Forum: Volume 115 (11500-11599)
Topic: 11530 - SMS Typing
Replies: 41
Views: 8619

Re: 11530 - sms typing -- Why WA???? :(

#include <iostream> #include <stdio.h> #include <cstring> using namespace std; int posFinder(char c); int main() { int numOfTestCases; string s; int sumOfPos=0; int caseCounter=0; char dummy; scanf("%d%c",&numOfTestCases,&dummy); for (int i=0;i<numOfTestCases ;i++ ) { caseCounter++; getline(cin,s);...
by anik.bit0104
Sun May 01, 2011 9:26 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 45919

Re: 673 - Parentheses Balance

#include <stdio.h> #include <iostream> #include <stack> using namespace std; int main() { stack <char> bracks; char c; string s; long unsigned numOfTestCase; cin>>numOfTestCase; for (long unsigned i=0;i<numOfTestCase ; i++) { cin>>s; for (int i=0;i<s.length() ; i++) { if (bracks.empty()) { bracks.p...
by anik.bit0104
Mon Apr 25, 2011 2:15 pm
Forum: Volume 116 (11600-11699)
Topic: 11608 - No Problem
Replies: 25
Views: 9916

Re: 11608 - No Problem

#include <algorithm> #include <iostream> #include <stdlib.h> #include <string> #include <string> #include <vector> #include <stdio.h> using namespace std; int main() { int caseCounter=0; int inp; int oneInp; vector <int> arr1; int extra=0; vector <int> arr2; freopen("in","r",stdin); while (scanf("%...
by anik.bit0104
Wed Apr 13, 2011 5:13 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 19199

Re: 382 WA

#include <iostream> #include <stdio.h> #include <cmath> using namespace std; //functions void listOfDivisors(unsigned int givenNum); int caseCounter=0; unsigned int isPerfectOrAbundOrDef(unsigned int l); string numberOfSpaces(unsigned int givenNum); unsigned int arrayOfDivisors[20000]; int main() {...
by anik.bit0104
Thu Sep 23, 2010 3:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 46204

Re: 10055 - Hashmat the Brave Warrior

I'm having runtime error in my java code of this program after submitting. But in my eclipse ide, it works fine. Can you guys tell me what's the problem? class Vol0Prob10055Hashmat { public static void main(String[] args) { java.util.Scanner sc=new java.util.Scanner(System.in); while(sc.hasNextLong(...
by anik.bit0104
Thu Sep 23, 2010 1:54 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 46204

Re: 10055 - Hashmat the Brave Warrior

You should have used a loop. Your code would be terminated after one computation.

Go to advanced search