제출 #924652

#제출 시각아이디문제언어결과실행 시간메모리
924652biankStone Arranging 2 (JOI23_ho_t1)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>using namespace std;#define forn(i,n) for(int i=0;i<int(n);i++)#define forsn(i,s,n) for(int i=int(s);i<int(n);i++)int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; vector<int> a(n); map<int,int> last; forn(i,n){ cin >> a[i]; last[a[i]]=i; } forn(i,n){ int j=last[a[i]]; forsn(k,i,j) a[k]=a[j]; i=j; } forn(i,n) cout << a[i] << '\n'; }

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

Main.cpp:1:30: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h>using namespace std;#define forn(i,n) for(int i=0;i<int(n);i++)#define forsn(i,s,n) for(int i=int(s);i<int(n);i++)int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);  int n; cin >> n; vector<int> a(n); map<int,int> last; forn(i,n){     cin >> a[i];     last[a[i]]=i; }
      |                              ^~~~~~~~~
Main.cpp:1:9: fatal error: bits/stdc++.h>usin: No such file or directory
    1 | #include<bits/stdc++.h>using namespace std;#define forn(i,n) for(int i=0;i<int(n);i++)#define forsn(i,s,n) for(int i=int(s);i<int(n);i++)int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);  int n; cin >> n; vector<int> a(n); map<int,int> last; forn(i,n){     cin >> a[i];     last[a[i]]=i; }
      |         ^~~~~~~~~~~~~~~~~~~~
compilation terminated.