답안 #716073

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
716073 2023-03-28T22:10:45 Z bane Examination (JOI19_examination) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#pragma GCC target ("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")     
using namespace std;
       
int n,q;
int A[100001], B[100001];
       
int main() {
	scanf("%d%d", &n, &q);
	fr(i, 0, n)
		scanf("%d%d", &A[i], &B[i]);
	while(q--){
		int x,y,z;
		scanf("%d%d%d", &x, &y, &z);
		int ans = 0;
		fr(i, 0, n){
			ans+=(A[i] >= x) & (B[i] >= y) & (A[i] + B[i] >= z);
		}
		printf("%d\n", ans);
	}
}

Compilation message

examination.cpp: In function 'int main()':
examination.cpp:12:5: error: 'i' was not declared in this scope
   12 |  fr(i, 0, n)
      |     ^
examination.cpp:12:2: error: 'fr' was not declared in this scope
   12 |  fr(i, 0, n)
      |  ^~
examination.cpp:11:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |  scanf("%d%d", &n, &q);
      |  ~~~~~^~~~~~~~~~~~~~~~
examination.cpp:16:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |   scanf("%d%d%d", &x, &y, &z);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~