Search found 2 matches

by Yusuf_sust
Sat Feb 27, 2016 10:30 pm
Forum: Volume 3 (300-399)
Topic: 336 - A Node Too Far
Replies: 121
Views: 36338

Re: 336 - A Node Too Far

Why WA anybody help me. my code #include <bits/stdc++.h> using namespace std; int visit[100000], dist[100000]; void BFS(int start, vector <int> *a); int main() { int n, t = 1; while(scanf("%d", &n) && n) { int j = 0; vector <int> a[100000]; set <int> s; map <long, int> m; for(int i = 0; i < n; ++i) ...
by Yusuf_sust
Wed Dec 16, 2015 3:06 am
Forum: Bugs and suggestions
Topic: uva 10101
Replies: 0
Views: 1148

uva 10101

Why get WA. Here is my code #include <stdio.h> #include <string.h> int main() { int i, j, k, l, t = 1; char s[100], s1[200]; while(gets(s)) { l = strlen(s); j = 0; for(i = l - 1; i >= 0;) { if(s != '0' || s[i-1] != '0') { s1[j++] = s[i--]; } else i--; if(i >= 0) { if(s != '0') s1[j++] = s[i--]; else...

Go to advanced search