Search found 7 matches

by graph_dp
Thu Jan 17, 2013 7:41 pm
Forum: Volume 102 (10200-10299)
Topic: 10279 - Mine Sweeper
Replies: 102
Views: 28270

i am getting WA at uva=10279(Mine Sweeper)

# include <iostream> # include <cstdio> using namespace std; int cx[]={-1,-1,-1,0,0,1,1,1}; int cy[]={-1,0,1,-1,1,-1,0,1}; char g[100][100];int n,m; int DFS(int x,int y){ int cnt=0; for(int i=0;i<8;i++){ if(g[x+cx ][y+cy ]=='*'){ cnt++; } } return cnt; } int main (){ int i,j,k=1; bool flag=false; wh...
by graph_dp
Thu Jan 03, 2013 11:57 pm
Forum: Volume 114 (11400-11499)
Topic: 11470 - Square Sums
Replies: 9
Views: 3902

getting WA at uva=11470;http://uva.onlinejudge.org/external/

why i am getting WA..........?????
thnkz again brianfry713 Got AC....many many thnkz
by graph_dp
Thu Nov 08, 2012 8:10 pm
Forum: Volume 4 (400-499)
Topic: 455 - Periodic Strings
Replies: 73
Views: 16897

uva=455 i am gettign WA why.............

#include <iostream> #include <string> #define inf 1<<20 using namespace std; string a; int countSubstring(string sub) { if (sub.length() == 0) return 0; int count = 0; for (size_t offset = a.find(sub); offset != std::string::npos; offset = a.find(sub, offset + sub.length())) { ++count; } return coun...
by graph_dp
Wed Oct 17, 2012 9:13 pm
Forum: Volume 119 (11900-11999)
Topic: 11968 - In The Airport
Replies: 10
Views: 3748

i am getting WA in uva=11968

#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <map> #define LL long long int using namespace std; struct data{ int val; bool operator<(const data b)const{ return val>b.val; } }; int main () { int kase,e,w; cin>>kase;int y=1; while(kase--){ data temp; map<int,i...
by graph_dp
Mon Oct 01, 2012 10:24 pm
Forum: Volume 115 (11500-11599)
Topic: 11541 - Decoding
Replies: 12
Views: 4815

uva=11541 i am gettign WA why.............

thank you very much brianfry i got AC after removing getchar()
by graph_dp
Sun Sep 16, 2012 7:43 pm
Forum: Volume 117 (11700-11799)
Topic: 11777 - Automate the Grades
Replies: 32
Views: 5666

uva=11777 getting wa...why?

WHY I AM GETTING WA......... --------------------------------------------- #include <iostream> #include <algorithm> using namespace std; int main(){ int kase; cin>>kase;int k=1; while(kase--){ int a[4],i,j,n,res,sum1; int sum=0; for(i=0;i<4;i++){ cin>>n; sum+=n;} for(j=0;j<3;j++){ cin>>a[j]; } sort(...
by graph_dp
Fri Sep 14, 2012 8:48 am
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 8591

uva=484- The Department of Redundancy Department

#include <iostream> #include <cstdio> #include <string.h> #include <queue> #include <string> #include <map> using namespace std; char str[1000000]; queue<string>q;string p; map<string,int>MP; map<string,int>::iterator it; int main(){ MP.clear(); char *result; gets(str); result = strtok(str," "); whi...

Go to advanced search