Code Submission Evaluation System Login

HIIT Open 2016

Start:2016-05-28 11:00:00
End:2016-05-28 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2016 - Results
History
2016-05-28 15:48:44
2016-05-28 15:48:32
Task:Judge correctness
Sender:Oispa Kaljaa
Submission time:2016-05-28 15:48:44
Language:C++
Status:READY
Result:TIME LIMIT EXCEEDED

Test results

testverdicttime (s)
#1ACCEPTED0.05 / 3.00details
#2TIME LIMIT EXCEEDED-- / 3.00details
#3TIME LIMIT EXCEEDED-- / 3.00details
#4TIME LIMIT EXCEEDED-- / 3.00details
#5TIME LIMIT EXCEEDED-- / 3.00details
#6TIME LIMIT EXCEEDED-- / 3.00details
#7TIME LIMIT EXCEEDED-- / 3.00details
#8TIME LIMIT EXCEEDED-- / 3.00details
#9TIME LIMIT EXCEEDED-- / 3.00details
#10TIME LIMIT EXCEEDED-- / 3.00details

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:13:9: warning: array subscript has type 'char' [-Wchar-subscripts]
     cn[c] = nyt;
         ^
input/code.cpp:18:9: warning: array subscript has type 'char' [-Wchar-subscripts]
     cn[c] = nyt;
         ^
input/code.cpp:23:9: warning: array subscript has type 'char' [-Wchar-subscripts]
     cn[c] = nyt;
         ^
input/code.cpp:46:19: warning: array subscript has type 'char' [-Wchar-subscripts]
    sum+=cn[a[i][k]]*cn[a[j][k]];
                   ^
input/code.cpp:46:31: warning: array subscript has type 'char' [-Wchar-subscripts]
    sum+=cn[a[i][k]]*cn[a[j][k]];
                               ^

Code

#include <bits/stdc++.h>

using namespace std;

string a[5050], x[5050];
int main(){
  cin.sync_with_stdio(0);
  cin.tie(0);
  int cn[1010];
  char nc[1010];
  int nyt = 0;
  for(char c = 'A'; c <= 'Z'; c++){
    cn[c] = nyt;
    nc[nyt] = c;
    nyt++;
  }
  for(char c = 'a'; c <= 'z'; c++){
    cn[c] = nyt;
    nc[nyt] = c;
    nyt++;
  }
  for(char c = '0'; c <= '9'; c++){
    cn[c] = nyt;
    nc[nyt] = c;
    nyt++;
  }
  cn['+'] = nyt;
  nc[nyt] = '+';
  nyt++;
  cn['/'] = nyt;
  nc[nyt] = '/';
  nyt++;
  
  int tests; cin >> tests;
  while(tests--){
    int n; cin >> n;
    for(int i = 0; i < n; i++)
      cin >> a[i];
    for(int i = 0; i < n; i++)
      cin >> x[i];
    bool ans = 1;
    for(int i = 0; i < n; i++){
      for(int j = 0; j < n; j++){
	int sum = 0;
	for(int k = 0; k < n; k++){
	  sum+=cn[a[i][k]]*cn[a[j][k]];
	}
	sum%=nyt;
	if(x[i][j] != nc[sum]){
	  ans = 0;
	  goto ohi;
	}
      }  
    }
    
    ohi:
    cout << ans << endl;
  } 
  return 0;
}

Test details

Test 1

Verdict: ACCEPTED

input
500
12
N49lyQuAZh1l
PwNJA+wuTBr+
HO09lJg8kbup
yDfjEETO9FbY
Aplqi5vnLc98
0/hYfkOFcZVV
/ckgzeISmwGl
br2MOJZnYtrh
fEUiVy4Miasn
0u09RS8s83nZ
gQjEE8dDfIk7
g8si6nOeea01
XCc/9qK8WGTj
CK39fpfbB/4q
c3GYFr/oDwzG
/9Yf5gOIARp8
9fF53gW9SfQF
qprggzi/g4br
...
view   save

correct output
0
0
1
1
1
0
0
0
0
0
1
1
0
0
0
1
0
0
1
1
...
view   save

user output
0
0
1
1
1
0
0
0
0
0
1
1
0
0
0
1
0
0
1
1
...
view   save

Test 2

Verdict: TIME LIMIT EXCEEDED

input
3
666
OvHf9jpB0RViia/ZD3gRQ7o1FELYh3...
L5gSvHpMnBJLnEP2owz8yZ7PgwI62l...
view   save

correct output
0
0
1
view   save

user output
(no output)
view   save

Test 3

Verdict: TIME LIMIT EXCEEDED

input
2
517
RWVknnH+hL6AfeKFbOu6OuAJL9dvLw...
FM2IGsbyia33qivbugYG85wbElidVu...
view   save

correct output
0
1
view   save

user output
(no output)
view   save

Test 4

Verdict: TIME LIMIT EXCEEDED

input
1
5000
QP9pS1MOq6eDDKGQh//TrJUIvbM53a...
view   save

correct output
0
view   save

user output
(no output)
view   save

Test 5

Verdict: TIME LIMIT EXCEEDED

input
1
5000
RSX7ZuQE6A94s8s+9oP1uCDHRkmZ+7...
view   save

correct output
1
view   save

user output
(no output)
view   save

Test 6

Verdict: TIME LIMIT EXCEEDED

input
1
5000
b0V0j4vQ8CeiJrcUk2yssPF1B9EEDb...
view   save

correct output
1
view   save

user output
(no output)
view   save

Test 7

Verdict: TIME LIMIT EXCEEDED

input
1
5000
VLdpW71f4Cdr+xdCRlwmAnNfMjqwMU...
view   save

correct output
0
view   save

user output
(no output)
view   save

Test 8

Verdict: TIME LIMIT EXCEEDED

input
1
5000
kBZaGETPWmyNR4NCvCPbJnvq2+JBfP...
view   save

correct output
0
view   save

user output
(no output)
view   save

Test 9

Verdict: TIME LIMIT EXCEEDED

input
1
5000
PES9AhJn+FZBVO5gqRLYbavSvaDUfU...
view   save

correct output
0
view   save

user output
(no output)
view   save

Test 10

Verdict: TIME LIMIT EXCEEDED

input
1
5000
EoXwgdrAtKtV4M7jn0jAkNwkJX+be9...
view   save

correct output
1
view   save

user output
(no output)
view   save