제출 #714639

#제출 시각아이디문제언어결과실행 시간메모리
714639bin9638Ancient Machine (JOI21_ancient_machine)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #ifndef SKY #include "Anna.h" #endif // SKY using namespace std; #define N 100010 #define ll long long #define ii pair<int,int> #define fs first #define sc second #define pb push_back #define iii pair<int,ii> #ifdef SKY void Send(int a) { cout<<a<<" "; } #endif // SKY void Anna(int n, vector<char> s) { for(int i=0;i<n;i++) if(s[i]=='Z') Send(1); else Send(0); } #ifdef SKY int main() { freopen("A.inp","r",stdin); freopen("A.out","w",stdout); ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int n; cin>>n; vector<char>s; for(int i=1;i<=n;i++) { char ch; cin>>ch; s.pb(ch); } Anna(n,s); return 0; } #endif // SKY
#include<bits/stdc++.h> #ifndef SKY #include "Bruno.h" #endif // SKY using namespace std; #define N 100010 #define ll long long #define ii pair<int,int> #define fs first #define sc second #define pb push_back #define iii pair<int,ii> #ifdef SKY void Remove(int d) { cout<<d<<" "; } #endif // SKY void Bruno(int n, vector<int> a) { int pos=0; for(int i=0;i<n;i++) if(a[i]==1) { //cout<<i<<endl; for(int j=i-1;j>=pos;j--) Remove(j); Remove(i); pos=i+1; } for(int i=pos;i<n;i++) Remove(i); } #ifdef SKY int main() { freopen("A.inp","r",stdin); freopen("A.out","w",stdout); ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int n; cin>>n; vector<int>a; for(int i=1;i<=n;i++) { int u; cin>>u; a.pb(u); } Bruno(n,a); return 0; } #endif // SKY

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

/usr/bin/ld: /tmp/ccVWUhLe.o: in function `main':
grader_bruno.cpp:(.text.startup+0x24d): undefined reference to `Bruno(int, int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status