Search found 3 matches

by cs_lyxaa
Mon Oct 08, 2007 6:59 am
Forum: Volume 101 (10100-10199)
Topic: 10129 - Play on Words
Replies: 34
Views: 13724

Again, I don't know what has happened to my program. I tried all the test cases from board. All seems all right. But I got WA at the judge~~

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

int visited[26],edges[26][26];

void DFS(int v){
visited[v]=1;
for (int w=0;w<26;w++){
if ...
by cs_lyxaa
Mon Oct 08, 2007 3:55 am
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 35732

Thanks so much. I finally got AC in 0.67s!!~~~
Through your case, I found that the bug was the negative modular arithmetic. C++ gives me the result that (-1)%10=-1. No wonder I got WA before.

Try the cases...

Input: 2
1 7 4 0
9 4 8 8
2
4 5 5 1
7 1 1 5

3 4 8 4
9 9 2 5
5
3 3 3 7
4 3 8 0
8 8 0 6
8 ...
by cs_lyxaa
Thu Oct 04, 2007 4:54 pm
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 35732

Hey,guys, I still got WA. I need help too...
Any comment is appreciated.

Go to advanced search