# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
892547 | I_FloPPed21 | 은행 (IZhO14_bank) | C++14 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;}
컴파일 시 표준 에러 (stderr) 메시지
bank.cpp:1:31: warning: extra tokens at end of #include directive 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^~~~~~~~~ bank.cpp:1:220: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:292: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:354: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:354: error: extended character is not valid in an identifier bank.cpp:1:390: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:390: error: extended character is not valid in an identifier bank.cpp:1:670: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:762: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:786: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:930: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m ; for ( int i = 1; i <= n ; i ++ ) { cin >> v[ i ] ; } for ( int i = 1; i <= m ; i ++ ) cin >> b[ i ] ; posixor [ 1 ] .push_back(0); for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 0 ; j < ( 1 << m ) ; j ++ ) { int sum = 0 ; for ( int f = 1 ; f <= m ; f ++ ) { if ( j & ( 1 << ( f - 1 ) ) ) sum += b[ f ] ; } if ( sum == v[ i ] ) { posib [ i ] .push_back( j ) ; } } if ( posib[ i ] .size() == 0 || posixor [ i ] .size() == 0 ) { cout << "NO" << '\n'; return 0 ; } for ( int d = 0 ; d < posixor [ i ] .size() ; d ++ ) { long long j = posixor [ i ][ d ] ; for (int k = 0 ; k < posib [ i ] .size() ; k ++ ) { if ( (( j ) & ( posib [ i ][ k ] )) == 0 ) { if ( i == n ) { cout << "YES" << '\n'; return 0 ; } int val = (posib [ i ][ k ] | ( j )); posixor [ i + 1] .push_back(val); } } } } cout << "NO" << '\n'; return 0;} | ^ bank.cpp:1:1047: error: extended character is not valid in an identifier 1 | #include <bits/stdc++.h>using namespace std;int n, m ;int v[ 22 ], b [ 22 ] ;vector<int> posib [ 22 ] ;vector<int> posixor[ 22 ] ;int main(){ ios::sync_with_stdi