QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#567884#9308. World CupLa5te2Compile Error//C++20639b2024-09-16 14:29:192024-09-16 14:29:19

Judging History

你现在查看的是最新测评结果

  • [2024-09-16 14:29:19]
  • 评测
  • [2024-09-16 14:29:19]
  • 提交

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
      |                  ^~~~