Task: | Ruudukko |
Sender: | finnish_guy |
Submission time: | 2022-11-10 09:31:07 +0200 |
Language: | C++ (C++11) |
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 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#3 | WRONG ANSWER | 0.00 s | 1, 2, 3 | details |
#4 | WRONG ANSWER | 0.01 s | 2, 3 | details |
#5 | WRONG ANSWER | 0.00 s | 2, 3 | details |
#6 | WRONG ANSWER | 0.01 s | 2, 3 | details |
#7 | WRONG ANSWER | 0.00 s | 3 | details |
#8 | WRONG ANSWER | 0.01 s | 3 | details |
#9 | WRONG ANSWER | 0.01 s | 3 | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:29:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 29 | else if(vec[7]=1 && vec[2]==1 && vec[0]==1){
Code
#include <iostream> #include <cmath> #include <math.h> #include <vector> using namespace std; int main(){ long long x, y=0; double z=0; vector<long long>vec(10); for(int i =0; i<=9; i++){ cin >> x; vec[i] = x; y += x; } if(vec[2]==1 && vec[0]==0 && vec[4]==0){ cout << 2 << "\n"; } else if(vec[6]==1 && vec[0]==0){ cout << 3 << "\n"; } else if(vec[2]==1 && vec[4]==1 && vec[0]==0){ cout << 4 << "\n"; } else if(vec[1]== 1&&vec[2] == 1 && vec[0]==1){ cout << 5 << "\n"; } else if(vec[7]=1 && vec[2]==1 && vec[0]==1){ cout << 6 << "\n"; } else { for(long long i=1; i<=10*10*10*10*10; i++){ //z = 1+floor(0.5*log10(2.0*M_PI*(double)i)+(double)i*log10((double)i/M_E)+(1.0/(12.0*(double)i))*log10(M_E)+(1/(12*i)-1/(360*i*i*i))*log10(M_E)); z += log10((double)i); if(floor(z)+1 == y){ cout << i << "\n"; break; } if(floor(z) == y && i>10000){ cout << i << "\n"; } } } }
Test details
Test 1
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
3 1 1 1 1 1 1 1 1 1 |
correct output |
---|
9 |
user output |
---|
(empty) |
Test 2
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
3 1 2 3 6 5 4 7 8 9 |
correct output |
---|
135 |
user output |
---|
40 |
Test 3
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
3 7 8 1 4 5 4 3 9 6 |
correct output |
---|
57 |
user output |
---|
41 |
Test 4
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
correct output |
---|
10000 |
user output |
---|
(empty) |
Test 5
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
100 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
correct output |
---|
187458477 |
user output |
---|
93 |
Test 6
Group: 2, 3
Verdict: WRONG ANSWER
input |
---|
100 2995 8734 1018 2513 7971 5063 ... |
correct output |
---|
964692694 |
user output |
---|
12587 |
Test 7
Group: 3
Verdict: WRONG ANSWER
input |
---|
1000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
correct output |
---|
1000000 |
user output |
---|
453 |
Test 8
Group: 3
Verdict: WRONG ANSWER
input |
---|
1000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
correct output |
---|
229147081 |
user output |
---|
(empty) |
Test 9
Group: 3
Verdict: WRONG ANSWER
input |
---|
1000 520283 805991 492643 75254 527... |
correct output |
---|
951147313 |
user output |
---|
(empty) |