제출 #1284489

#제출 시각아이디문제언어결과실행 시간메모리
1284489nikakhSouvenirs (IOI25_souvenirs)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; pair<vector<int>, long long> transaction(long long M){ } void buy_souvenirs(int N, long long P0){ for(int i = 1; i < N; i++){ for(int j = 0; j < i; j++){ transaction(P0 - i); } } for(int i = 0; i < N; i++){ cout << i << " \n"[i == N - 1]; } }

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

souvenirs.cpp: In function 'std::pair<std::vector<int>, long long int> transaction(long long int)':
souvenirs.cpp:5:1: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | }
      | ^
/usr/bin/ld: /tmp/ccNigxdn.o: in function `transaction(long long)':
stub.cpp:(.text+0x200): multiple definition of `transaction(long long)'; /tmp/cctDM8dr.o:souvenirs.cpp:(.text.unlikely+0x0): first defined here
collect2: error: ld returned 1 exit status