제출 #565575

#제출 시각아이디문제언어결과실행 시간메모리
565575almothana05Xylophone (JOI18_xylophone)C++14
컴파일 에러
0 ms0 KiB
#include <cstdio> #include <cstdlib> #include "xylophone.h" #include <bits\stdc++.h> using namespace std; static int num[5006]; void solve(int menge) { int be = 1 , en = menge , comp , cmp; while(query(be , en) == menge - 1){ be++; } be--; while(query(be , en) == menge - 1){ en--; } en++; num[be] = 1; num[en] = menge; cout << be << ' ' << en << "\n"; if(be > 1){ num[be - 1] = 1 + query(be - 1 , be); } num[be + 1] = 1 + query(be , be + 1); if(en < menge){ num[en + 1] = menge - query(en , en + 1); } num[en - 1] = menge - query(en - 1 , en); for(int i = be - 2 ; i > 0 ; i--){ if(num[i] != 0){ continue; } // cout << num[i] << "\n"; cmp = query(i , i + 1); comp = query(i , i + 2); if(comp == cmp + abs(num[i + 1] - num[i + 2]) ){ num[i] = num[i + 1] + (cmp * ( (num[i + 1] - num[i + 2]) / abs(num[i + 1] - num[i + 2]) ) ); } else{ num[i] = num[i + 1] + (-1 * cmp * ( (num[i + 1] - num[i + 2]) / abs(num[i + 1] - num[i + 2]) ) ); } } for(int i = be + 2 ; i <= menge ; i++){ if(num[i] != 0){ continue; } cmp = query(i - 1 , i); comp = query(i - 2, i); if(comp == cmp + abs(num[i - 1] - num[i - 2]) ){ num[i] = num[i - 1] + (cmp * ( (num[i - 1] - num[i - 2]) / abs(num[i - 1] - num[i - 2]) ) ); } else{ num[i] = num[i - 1] + (-1 * cmp * ( (num[i - 1] - num[i - 2]) / abs(num[i - 1] - num[i - 2]) ) ); } } // cout << "ja\n"; for(int i = 1; i <= menge ; i++){ answer(i , num[i]); } }

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

xylophone.cpp:4:10: fatal error: bits\stdc++.h: No such file or directory
    4 | #include <bits\stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.