Codeforces Visualizer is now a progressive web app. It means now you can *install* it on mobile or pc.

I never expected cfviz to be used for so long and by so many people when I built it two years ago. Thanks everyone for staying with cfviz :)

# | User | Rating |
---|---|---|

1 | tourist | 3682 |

2 | ecnerwala | 3603 |

3 | Benq | 3549 |

4 | Radewoosh | 3494 |

5 | Petr | 3452 |

6 | ksun48 | 3413 |

7 | maroonrk | 3406 |

8 | Miracle03 | 3314 |

9 | scott_wu | 3313 |

10 | Um_nik | 3299 |

# | User | Contrib. |
---|---|---|

1 | 1-gon | 214 |

2 | Errichto | 189 |

3 | awoo | 188 |

4 | rng_58 | 187 |

5 | SecondThread | 186 |

6 | Um_nik | 177 |

7 | Ashishgup | 176 |

8 | maroonrk | 173 |

9 | antontrygubO_o | 171 |

10 | -is-this-fft- | 169 |

Codeforces Visualizer is now a progressive web app. It means now you can *install* it on mobile or pc.

I never expected cfviz to be used for so long and by so many people when I built it two years ago. Thanks everyone for staying with cfviz :)

*Update: With the same logic got accepted with python 3. So the problem is C++ specific. Please help me find the fault.*

I was trying to solve UVa-1592-Database here's my code:

```
# include <bits/stdc++.h>
using namespace std;
string db[10007][12];
char buff[85];
int n,m;
bool read() {
if(scanf("%d %d\n", &n, &m) == EOF) return false;
for (int i = 0; i < n; i++) {
gets(buff);
int j=0,k=0;
while(buff[j] != '\0') {
if(buff[j] != ',') {
db[i][k].push_back(buff[j]);
} else k++;
j++;
}
}
}
bool findDup(int c1, int c2) {
map<pair<string, string>, int> mp;
for (int r = 0; r < n; r++) {
pair<string, string> p = make_pair(db[r][c1], db[r][c2]);
//cout<<r<<' '<<db[r][c1]<<' '<<db[r][c2]<<endl;
if(mp.find(p) == mp.end()) mp[p] = r;
else {
printf("NO\n%d %d\n%d %d\n", mp[p]+1, r+1, c1+1, c2+1);
return true;
}
}
return false;
}
void clear() {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
db[i][j].clear();
}
}
}
int main() {
while(read()) {
bool found = false;
for (int i = 0; i < m; i++) {
for (int j = i+1; j < m; j++) {
found = findDup(i,j);
if(found) break;
}
if(found) break;
}
if(!found) printf("YES\n");
clear();
}
return 0;
}
```

```
from sys import stdin
def find_dup(c1, c2):
mem = {}
for r in range(n):
pair = (tb[r][c1], tb[r][c2])
try:
r1 = mem[pair]+1
print("NO")
print(r1, r+1)
print(c1+1, c2+1)
return True
except KeyError:
mem[pair] = r
return False
while True:
line = stdin.readline()
if not line:
break
n, m = map(int, line[:-1].split())
tb = []
for i in range(n):
line = stdin.readline()
tb.append(list(line[:-1].split(',')))
found = False
for i in range(m):
for j in range(i+1, m):
found = find_dup(i, j)
if found:
break
if found:
break
if not found:
print("YES")
```

Why am I getting WA? Can someone help with fresh eyes please? It passes the tests given in uDebug. Thanks

Hello cool coders! This is my first post on CF. This is to share a small tool I built using the codeforces api. Give it a try here: http://cfviz.netlify.com. The source is available here. Please let me know if you found any bug or issue.

Current features are:

- Verdicts chart
- Languages chart
- Tags chart
- Levels chart
- Total tried problems count
- Total solved problems count
- Average and max attempts
- Count of problems solved with one submission
- Max AC for a single problem (It indicates in how many ways someone solved a problem)
- List of unsolved problems

- Current, max and min rating
- Number of contests
- Best and worst position in contest
- Max positive and negative rating change
- Compared rating time-line
- Total tried problem count compared
- Total solved problem count compared
- Average and max attempts compared
- Count of problems solved with one submission compared
- Max AC for a single problem compared
- Tags compared
- Levels compared

Two new features was added since this post was published. 1. Submissions heatmap in single user analytics 2. Common contest rank in comparison

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/21/2021 10:05:41 (i3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|