fork download
  1. /**
  2.  * Day la file thu vien mau, giup thi sinh co the hieu ro hon cach cai dat cua bai va chay thu chuong trinh.
  3.  * File thu vien nay khong duoc su dung de cham bai.
  4.  * De chay thu, thi sinh dat file nay cung thu muc voi file bai lam (guess.cpp) va
  5.  * bien dich file guess.cpp nhu binh thuong.
  6.  * Chuong trinh nhan vao hai so nguyen x va y, goi ham play(1) va in ra cac gia tri tra ve cua ham play
  7. **/
  8.  
  9. #include <bits/stdc++.h>
  10. using namespace std;
  11.  
  12. pair<int, int> play(int subtask_id);
  13.  
  14. int x, y;
  15. bool check(long long k) {
  16. for (int i = 0; i <= k; i++) for (int j = 0; j <= k; j++) if (x * i + y * j == k) return true;
  17. return false;
  18. }
  19.  
  20. int main(void) {
  21. cin >> x >> y;
  22. pair<int, int> result = play(1);
  23. cout << result.first << " " << result.second << "\n";
  24. return 0;
  25. }
  26.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/bin/ld: /home/PxNm67/ccxA7JTE.o: in function `main':
prog.cpp:(.text.startup+0x2e): undefined reference to `play(int)'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty