제출 #1325142

#제출 시각아이디문제언어결과실행 시간메모리
1325142brendonwQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
		int n, t;
		cin >> n >> t;
		while (t--) {
			int x, y;
			cin >> x >> y;
			if ((x & 1) != (y & 1)) {
				if (x & 1) {
					cout << 1 << '\n';
				} else {
					cout << 20 << '\n';
				}
				continue;
			}
			for (int i = 1; i < 10; ++i) {
				if ((x >> i & 1) != (y >> i & 1)) {
					cout << 2 * i + (x >> i & 1) << '\n';
					break;
				}
			}
  }
	return 0;
}
#include <bits/stdc++.h>

using namespace std;

int main(){
  		int n, t;
		cin >> n >> t;
		while (t--) {
			int q, h;
			cin >> q >> h;
			int bit = h & 1, shift = h / 2;
			if (h == 20) {
				bit = 0, shift = 0;
			}
			if ((q >> shift & 1) == bit) {
				cout << "yes\n";
			} else {
				cout << "no\n";
			}
		}
}

컴파일 시 표준 에러 (stderr) 메시지

# 1번째 컴파일 단계

/usr/bin/ld: /tmp/ccGsQfn7.o: in function `main':
grader_encode.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccEkoe8l.o:encoder.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccGsQfn7.o: in function `main':
grader_encode.c:(.text.startup+0x13a): undefined reference to `encode(int, int, int)'
collect2: error: ld returned 1 exit status