QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567884 | #9308. World Cup | La5te2 | Compile Error | / | / | C++20 | 639b | 2024-09-16 14:29:19 | 2024-09-16 14:29:19 |
Judging History
answer
#include<bits/stdc++.h>
//using namespace std;
void solve() {
std::vector<int> a(32);
for(int i = 0; i < 32; i++) std::cin >> a[i];
int c = a[0];
std::sort(a.begin(), a.end());
int pos;
for(int i = 0; i < 32; i++) if(a[i] == c) {
pos = i;
break;
}
if(pos >= 2) {
if(pos >= 6) {
if(pos >= 13) {
if(pos >= 27) {
if(pos >= 31) std::cout << 1 << '\n';
else cout << 2 << '\n';
}
else cout << 4 << '\n';
}
else cout << 8 << '\n';
}
else cout << 16 << '\n';
}
else cout << 32 << '\n';
}
int main()
{
int t = 1;
std::cin >> t;
while(t--) solve();
return 0;
}
Details
answer.code: In function ‘void solve()’: answer.code:18:46: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’? 18 | else cout << 2 << '\n'; | ^~~~ | std::cout In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:146, from answer.code:1: /usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ answer.code:20:38: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’? 20 | else cout << 4 << '\n'; | ^~~~ | std::cout /usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ answer.code:22:30: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’? 22 | else cout << 8 << '\n'; | ^~~~ | std::cout /usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ answer.code:24:22: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’? 24 | else cout << 16 << '\n'; | ^~~~ | std::cout /usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ answer.code:26:14: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’? 26 | else cout << 32 << '\n'; | ^~~~ | std::cout /usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~