Task: | Merkkijonot |
Sender: | kaurip |
Submission time: | 2019-10-01 21:28:22 +0300 |
Language: | C++ (C++17) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#2 | RUNTIME ERROR | 0.02 s | 2, 3 | details |
#3 | RUNTIME ERROR | 0.36 s | 3 | details |
#4 | RUNTIME ERROR | 0.27 s | 3 | details |
#5 | RUNTIME ERROR | 0.06 s | 3 | details |
#6 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#7 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#8 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#9 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#10 | RUNTIME ERROR | 0.03 s | 2, 3 | details |
#11 | RUNTIME ERROR | 0.02 s | 2, 3 | details |
#12 | RUNTIME ERROR | 0.03 s | 2, 3 | details |
#13 | RUNTIME ERROR | 0.02 s | 2, 3 | details |
#14 | RUNTIME ERROR | 0.02 s | 2, 3 | details |
#15 | RUNTIME ERROR | 0.36 s | 3 | details |
#16 | RUNTIME ERROR | 0.37 s | 3 | details |
#17 | RUNTIME ERROR | 0.36 s | 3 | details |
#18 | RUNTIME ERROR | 0.35 s | 3 | details |
#19 | RUNTIME ERROR | 0.36 s | 3 | details |
#20 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#21 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#22 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#23 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
#24 | WRONG ANSWER | 0.01 s | 1, 2, 3 | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:32:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(long j = 0; j < strings[i].length(); j++) { ~~^~~~~~~~~~~~~~~~~~~~~
Code
#include <iostream> #include <unordered_map> #include <string> using namespace std; long long fact(long n) { long long res = 1; for (long i = 2; i <= n; i++) res = res * i; return res; } long long nCr(long n, long r) { return fact(n) / (fact(r) * fact(n - r)); } int main() { long n; cin >> n; string strings[n]; for(long i = 0; i < n; i++) { cin >> strings[i]; } unordered_map<string,long> total; for(long i = 0; i < n; i++) { unordered_map<char, long> used; for(long j = 0; j < strings[i].length(); j++) { if(used.count(strings[i][j])) { strings[i][j] = used[strings[i][j]]; } else { used[strings[i][j]] = (char)j+48; strings[i][j] = (char)j+48; } } if(total.count(strings[i])) { total[strings[i]]++; } else { total[strings[i]] = 1; } } long long pairs = 0; for(pair<string,long> entry : total) { pairs += nCr(entry.second,2); cout << entry.first << ": " << entry.second << endl; } cout << pairs; return 0; }
Test details
Test 1
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 FFDISOVJLPIASANJRBHQXJVW HBGVRZFWOTAAVUPYKMKXAOBEYUE JKHXTPHUKTLTLNXMXMSYYFLF HCSZMXTZCUFHIHSTEWKHCFZRTXU ... |
correct output |
---|
20 |
user output |
---|
01234567293;<6>??A1CD36A: 1 0123456789:;<=>?;9B62E?4: 1 012345678944<<>?@2>6DE>4: 1 012315 ... Truncated |
Test 2
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
5000 AJEDROEDXRGDUSDAPZBXXQBPJ PDGCTAGCRTBCJICPFELRRMLFD TISAOTGMDKUCITIEFQVCSBZJYUUO FMASVJYFPMELSVLQWFZVLVMSPHYL ... |
correct output |
---|
2178556 |
user output |
---|
01034567599;<=>=1<B7D1F9HBJ1: ... Truncated |
Test 3
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 RESKYADLVRSDCDXJVECAJCAP CZLIWDHKVNRJHZINHFBOQEPN LSTRSDTLADUIWXFQJSQPVRSPBCTZ QEMSZOQSSVBRNQTCLJQIGVQO ... |
correct output |
---|
404880850 |
user output |
---|
012345613934<=>5@A<<DEFGH<1K: ... Truncated |
Test 4
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... |
correct output |
---|
4999950000 |
user output |
---|
(empty) |
Test 5
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 IPI Q SPGV UNYE ... |
correct output |
---|
1041990627 |
user output |
---|
0000: 2 0100: 28 000: 47 0110: 40 0020: 46 |
Test 6
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 A B C D ... |
correct output |
---|
190 |
user output |
---|
0: 20 190 |
Test 7
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
1 A |
correct output |
---|
0 |
user output |
---|
0: 1 0 |
Test 8
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 A BB CCC DDDD ... |
correct output |
---|
0 |
user output |
---|
0000000000000000000: 1 000000000000000000: 1 0: 1 0000: 1 00000000000000000000: 1 ... Truncated |
Test 9
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
2 A A |
correct output |
---|
1 |
user output |
---|
0: 2 1 |
Test 10
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
5000 SEKNHNRHSRFYIHSCDPGXPTGUSYBFKZ... |
correct output |
---|
20861 |
user output |
---|
0123456789:92: 1 012342628: 1 0123436789:;<0>?:A34A:;4:I4I9M... Truncated |
Test 11
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
5000 UGPWHWOWAREEIROZTRJGUCKDKTZJEO... |
correct output |
---|
22818 |
user output |
---|
0103456739:;<147@5:7DE4GH537L3... Truncated |
Test 12
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
5000 FFQQCBCINBDWIKHFPO SCJU DNHYPGIQNZS KNQCYRAXHHKORXMOVHL ... |
correct output |
---|
22268 |
user output |
---|
0123456269:;<=2?4<B?DEF4H?J1B0... Truncated |
Test 13
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
5000 QVWMSYPWXWBBXWCVEOUAVQLDWNBXZB... |
correct output |
---|
22589 |
user output |
---|
0123456789:1:7>?@00CC7FFH0@58@... Truncated |
Test 14
Group: 2, 3
Verdict: RUNTIME ERROR
input |
---|
5000 JYORMNQAKXHNRBWGGSMWXWXMBKPBZU... |
correct output |
---|
20482 |
user output |
---|
0123056779:93==56ABADBF72I5=2M... Truncated |
Test 15
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 DCXXVIEYQAASZJYUUVYZUIJFGVBAYC... |
correct output |
---|
8925377 |
user output |
---|
0123456589:;<6>09:9C3EFC51JKKM... Truncated |
Test 16
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 IJZHBIYNWQBDWNGZWVXJKXXWFVLPQX... |
correct output |
---|
8907840 |
user output |
---|
01234567897;;=51@3@C929@: 1 0123443789:;7=>?:: 1 0123456789:0888?@A2CD65GHA72LD... Truncated |
Test 17
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 GWUGLGQDAYGGJROIAKBMMICQMDUQQQ... |
correct output |
---|
8771809 |
user output |
---|
01234547791;<=;;@0BC3: 1 0123452712:;: 1 01234166892;<=4?@81CDEFGCG?E@0... Truncated |
Test 18
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 SWVSVXURRSLCSHCPAKWESIPCNDKYLD... |
correct output |
---|
8704480 |
user output |
---|
0123456789:7<29?@AB9D7<: 1 0123403789: 1 0123456731:77=6?=3BC231GH2H:11... Truncated |
Test 19
Group: 3
Verdict: RUNTIME ERROR
input |
---|
100000 ZLSNSZBGIMCOLPDEAKVDAJCTMBNRLH... |
correct output |
---|
8672362 |
user output |
---|
01224567897655>908BCD84GH1CDLD... Truncated |
Test 20
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 AAB D CDBAA D ... |
correct output |
---|
15 |
user output |
---|
012: 2 00: 1 0120: 1 01010: 1 0110: 1 ... Truncated |
Test 21
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 A CDD AABBC DBCB ... |
correct output |
---|
15 |
user output |
---|
012: 3 01: 2 01224: 1 01031: 1 01130: 1 ... Truncated |
Test 22
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 ACADD CDDCD DACA CCDCA ... |
correct output |
---|
17 |
user output |
---|
00222: 1 01114: 1 0003: 1 011: 2 012: 1 ... Truncated |
Test 23
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 DCDA BDBA CACBD BA ... |
correct output |
---|
7 |
user output |
---|
00224: 1 0023: 1 010: 1 0100: 1 01230: 1 ... Truncated |
Test 24
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
20 DDA BBCDC DDD CCD ... |
correct output |
---|
14 |
user output |
---|
01010: 1 01230: 1 010: 1 00232: 2 002: 4 ... Truncated |