Submission #589889

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5898892022-07-05 11:20:57ignusCards (LMIO19_korteles)C++14
100 / 100
184 ms4880 KiB
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int a[4][676];
int b[4][676];
int c[456976];
long long fin = 0;
for(int i = 0; i < 676; i++){
for(int j = 0; j < 4; j++)a[j][i]=0;
for(int j = 0; j < 4; j++)b[j][i]=0;
}
for(int i = 0; i < 456976; i++){
c[i]=0;
}
for(int i = 0; i < n; i++){
char t1, t2, t3, t4;
cin >> t1 >> t2 >> t3 >> t4;
t1-='A';
t2-='A';
t3-='A';
t4-='A';
long long r1=0, r4=0, r2c=0, r2o=0;
if(t1==t4&&t2==t3){
r4+=c[26*(26*(26*(t3)+t4)+t1)+t2];
}
if(t1==t4){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...