#include <set> #include <map> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <cctype> #include <cstdio> #include <string> #include <vector> #include <cassert> #include <cstdlib> #include <cstring> #include <sstream> #include <iostream> #include <algorithm> using namespace std; int main() { int n, i, j, t, tst, kase=1; scanf("%d",&tst); while ( tst-- ) { scanf("%d",&n); int count[200]={0}; bool valid = true; for (i=1 ; i<=n ; i++) { for (j=1 ; j<=n ; j++) { scanf("%d",&t); count[t]++; if (count[t]>n) { valid=false; } } } if (valid) printf("Case %d: yes\n",kase++); else printf("Case %d: no\n",kase++); } return 0; }
Tuesday, November 22, 2011
[UVa] 12036 - Stable Grid
Subscribe to:
Post Comments (Atom)
Connect Rapoo MT750S with Linux (Tested on Manjaro)
I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...
-
I like coding a lot, keeps me glued to the PC for hours. For that reason it's a need to edit the Syntax Highlighter to suit my eyes for...
-
I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...
-
Install MinGW GCC Port on Windows. 1. Just go to this address [ http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ ]...
No comments:
Post a Comment
Post your comment here. If you want to say something about programming problems, scripts, software etc, please try to be as descriptive as possible.