Task: | Arpakuutiot |
Sender: | Guuber |
Submission time: | 2020-10-01 12:45:12 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 35 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 35 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 1, 2 | details |
#2 | ACCEPTED | 0.01 s | 1, 2 | details |
#3 | ACCEPTED | 0.01 s | 1, 2 | details |
#4 | ACCEPTED | 0.01 s | 1, 2 | details |
#5 | ACCEPTED | 0.01 s | 1, 2 | details |
#6 | ACCEPTED | 0.01 s | 1, 2 | details |
#7 | ACCEPTED | 0.01 s | 1, 2 | details |
#8 | ACCEPTED | 0.01 s | 1, 2 | details |
#9 | ACCEPTED | 0.01 s | 1, 2 | details |
#10 | ACCEPTED | 0.01 s | 1, 2 | details |
#11 | WRONG ANSWER | 0.01 s | 2 | details |
#12 | WRONG ANSWER | 0.01 s | 2 | details |
#13 | WRONG ANSWER | 0.01 s | 2 | details |
#14 | WRONG ANSWER | 0.01 s | 2 | details |
#15 | WRONG ANSWER | 0.01 s | 2 | details |
#16 | WRONG ANSWER | 0.01 s | 2 | details |
#17 | WRONG ANSWER | 0.01 s | 2 | details |
#18 | WRONG ANSWER | 0.01 s | 2 | details |
#19 | WRONG ANSWER | 0.01 s | 2 | details |
#20 | WRONG ANSWER | 0.01 s | 2 | details |
#21 | WRONG ANSWER | 0.01 s | 2 | details |
#22 | WRONG ANSWER | 0.01 s | 2 | details |
#23 | WRONG ANSWER | 0.01 s | 2 | details |
#24 | WRONG ANSWER | 0.01 s | 2 | details |
#25 | WRONG ANSWER | 0.01 s | 2 | details |
#26 | WRONG ANSWER | 0.01 s | 2 | details |
#27 | WRONG ANSWER | 0.01 s | 2 | details |
#28 | WRONG ANSWER | 0.01 s | 2 | details |
#29 | WRONG ANSWER | 0.01 s | 2 | details |
#30 | WRONG ANSWER | 0.01 s | 2 | details |
#31 | ACCEPTED | 0.01 s | 1, 2 | details |
Compiler report
input/code.cpp: In function 'bool samat(std::vector<int>, std::vector<int>)': input/code.cpp:7:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < a.size(); i++){ ~~^~~~~~~~~~ input/code.cpp: In function 'int main()': input/code.cpp:80:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < vastaukset.size(); i++){ ~~^~~~~~~~~~~~~~~~~~~ input/code.cpp:82:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j = 0; j < vastaukset.size(); j++){ ~~^~~~~~~~~~~~~~~~~~~ input/code.cpp:69:22: warning: array subscript is below array bounds [-Warray-bounds] cout << s[-1][-1] << "\n"; ~~~~~~~~^ input/code.cpp:69:18: warning: array subscript is below array bounds [-Warray-bounds] cout << s[-1][...
Code
#include<bits/stdc++.h> using namespace std; char s[10][10]; vector<vector<int>> vastaukset = {}; bool samat(vector<int> a, vector<int> b){ for(int i = 0; i < a.size(); i++){ if(a[i] != b[i]) return false; } return true; } // int paalla = s[2][1]-'0'; // int edessa = s[1][1]-'0'; // int vasemmalla = s[0][0]-'0'; // int oikealla = s[0][2]-'0'; // int takana = s[3][1]-'0'; // int alhaalla = s[0][1]-'0'; vector<int> rotatex(vector<int> a1){ return {a1[0], a1[3], a1[1], a1[4], a1[2], a1[5]}; } vector<int> rotatey(vector<int> a1){ return {a1[1], a1[5], a1[2], a1[3], a1[0], a1[4]}; } bool tarkista(vector<int> a, vector<int> b){ // cout << "\n"; // for(auto u : b) cout << u << " "; // cout << " SSS \n"; for(int k = 0; k < 4; k++){ for(int j = 0; j < 4; j++){ for(int i = 0; i < 4; i++){ // for(auto u : a) cout << u << " "; // cout << "\n"; if(samat(a, b)) return 1; a = rotatex(a); } a = rotatey(a); } a = rotatex(a); } // cout << "\n\n"; return 0; } bool vali(int a){ if(a < 0 || a > 6) return true; return false; } int main(){ int n; cin >> n; for(int i = 0; i < n; i++){ for(int j = 0; j < 5; j++){ for(int k = 0; k < 5; k++){ cin >> s[j][k]; } } int paalla = s[2][1]-'0'; int edessa = s[1][1]-'0'; int vasemmalla = s[0][0]-'0'; int oikealla = s[0][2]-'0'; int takana = s[3][1]-'0'; int alhaalla = s[0][1]-'0'; if(vali(paalla) || vali(edessa) || vali(vasemmalla) || vali(oikealla) || vali(takana) || vali(alhaalla)){ cout << s[-1][-1] << "\n"; } //cout << "Paalla: " << paalla << "\n"; //cout << "Edessa: " << edessa << "\n"; //cout << "Vasemmalla: " << vasemmalla << "\n"; //cout << "Oikealla: " << oikealla << "\n"; //cout << "Takana: " << takana << "\n"; //cout << "Alhaalla: " << alhaalla << "\n"; vastaukset.push_back({paalla, edessa, vasemmalla, oikealla, takana, alhaalla}); } for(int i = 0; i < vastaukset.size(); i++){ bool bo = true; for(int j = 0; j < vastaukset.size(); j++){ // cout << i << ": " << j << "\n"; if(i != j && tarkista(vastaukset[i], vastaukset[j])){ //if(i != j && tarkista(ve1, ve2)){ cout << j+1 << " "; bo = false; } } if(bo){ cout << "-"; } cout << "\n"; } }
Test details
Test 1
Group: 1, 2
Verdict: ACCEPTED
input |
---|
3 165.. .4... .3... .2... ... |
correct output |
---|
3 - 1 |
user output |
---|
3 - 1 |
Test 2
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 264.. .5... .3... .1... ... |
correct output |
---|
3 4 5 1 2 5 2 4 |
user output |
---|
3 4 5 1 2 5 2 4 |
Test 3
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 152.. .4... .3... .6... ... |
correct output |
---|
3 5 4 1 5 2 1 3 |
user output |
---|
3 5 4 1 5 2 1 3 |
Test 4
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 142.. .6... .3... .5... ... |
correct output |
---|
4 5 3 2 1 5 1 4 |
user output |
---|
4 5 3 2 1 5 1 4 |
Test 5
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 123.. .4... .6... .5... ... |
correct output |
---|
3 4 5 1 2 5 2 4 |
user output |
---|
3 4 5 1 2 5 2 4 |
Test 6
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 213.. .6... .4... .5... ... |
correct output |
---|
4 5 3 2 1 5 1 4 |
user output |
---|
4 5 3 2 1 5 1 4 |
Test 7
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 314.. .5... .2... .6... ... |
correct output |
---|
3 4 5 1 2 5 2 4 |
user output |
---|
3 4 5 1 2 5 2 4 |
Test 8
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 163.. .2... .5... .4... ... |
correct output |
---|
4 5 3 2 1 5 1 4 |
user output |
---|
4 5 3 2 1 5 1 4 |
Test 9
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 264.. .1... .3... .5... ... |
correct output |
---|
2 3 1 3 1 2 5 4 |
user output |
---|
2 3 1 3 1 2 5 4 |
Test 10
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 214.. .3... .5... .6... ... |
correct output |
---|
5 3 4 2 4 2 3 1 |
user output |
---|
5 3 4 2 4 2 3 1 |
Test 11
Group: 2
Verdict: WRONG ANSWER
input |
---|
10 .41.. .5... .2... 36... ... |
correct output |
---|
9 4 6 8 7 10 2 6 8 - ... |
user output |
---|