제출 #561953

#제출 시각아이디문제언어결과실행 시간메모리
561953aryan12Broken Device (JOI17_broken_device)C++17
컴파일 에러
0 ms0 KiB
#include "Annalib.h" #include <bits/stdc++.h> using namespace std; void Anna(int N, long long X, int K, int P[]) { set<int> already_taken; for(int i = 0; i < K; i++) { already_taken.insert(P[i]); } long long cnt = 0; // cout << "X = " << X << "\n"; for(long long i = 0; i < N; i += 2) { if(cnt >= 60) { Set(i, 0); Set(i + 1, 0); continue; } long long bit_set = (1LL << cnt) & X; // cout << "bit_set = " << bit_set << "\n"; cnt++; if(already_taken.count(i) || already_taken.count(i + 1)) { cnt--; Set(i, 0); Set(i + 1, 0); // cout << "nothing: 00\n"; } else if(bit_set != 0 && !already_taken.count(i)) { Set(i, 1); Set(i + 1, 0); // cout << "10\n"; } else if(bit_set != 0 && !already_taken.count(i + 1)) { Set(i, 0); Set(i + 1, 1); // cout << "01\n"; } else { Set(i, 1); Set(i + 1, 1); // cout << "11\n"; } } }

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

/usr/bin/ld: /tmp/ccLEWnnC.o: in function `main':
grader_bruno.cpp:(.text.startup+0x13d): undefined reference to `Bruno(int, int*)'
collect2: error: ld returned 1 exit status