제출 #645831

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6458312022-09-28 06:55:48MadokaMagicaFanSpeedrun (RMI21_speedrun)C++14
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using vi = vector<int>;
using pi = pair<int, int>;
#define forn(i,n) for(int i = 0; i < n; ++i)
#define forb(i,b,n) for(int i = b; i < n; ++i)
#define pb push_back
#define sz(v) ((int)((v).size()))
#define ONPC
void setHintLen(int l);
void setHint(int i, int j, bool b);
int getLength();
bool getHint(int j);
bool goTo(int x);
void
assignHints(int s, int n, vi a, vi b)
{
if (s == 1) {
setHintLen(n);
forb(i,1,n) {
setHint(a[i], b[i], 1);
setHint(b[i], a[i], 1);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

speedrun.cpp: In function 'bool goTo(int)':
speedrun.cpp:93:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   93 |         if (a[i] == cur+1 && b[i] == x
speedrun.cpp: In function 'int32_t main(int, char**)':
speedrun.cpp:113:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  113 |         freopen(argv[1], "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccY5cJCD.o: in function `setHintLen(int)':
stub.cpp:(.text+0xc0): multiple definition of `setHintLen(int)'; /tmp/ccZ5iUVD.o:speedrun.cpp:(.text+0x3b0): first defined here
/usr/bin/ld: /tmp/ccY5cJCD.o: in function `setHint(int, int, bool)':
stub.cpp:(.text+0x150): multiple definition of `setHint(int, int, bool)'; /tmp/ccZ5iUVD.o:speedrun.cpp:(.text+0xa0): first defined here
/usr/bin/ld: /tmp/ccY5cJCD.o: in function `getLength()':
stub.cpp:(.text+0x200): multiple definition of `getLength()'; /tmp/ccZ5iUVD.o:speedrun.cpp:(.text+0x150): first defined here
/usr/bin/ld: /tmp/ccY5cJCD.o: in function `getHint(int)':
stub.cpp:(.text+0x210): multiple definition of `getHint(int)'; /tmp/ccZ5iUVD.o:speedrun.cpp:(.text+0x160): first defined here
/usr/bin/ld: /tmp/ccY5cJCD.o: in function `goTo(int)':
stub.cpp:(.text+0x420): multiple definition of `goTo(int)'; /tmp/ccZ5iUVD.o:speedrun.cpp:(.text+0x1c0): first defined here
/usr/bin/ld: /tmp/ccY5cJCD.o: in function `main':
stub.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccZ5iUVD.o:speedrun.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccY5cJCD.o: in function `main':
stub.cpp:(.text.startup+0x1d1): undefined reference to `assignHints(int, int, int*, int*)'
collect2: error: ld returned 1 exit status