Submission #1098309

#TimeUsernameProblemLanguageResultExecution timeMemory
1098309vjudge1Bank (IZhO14_bank)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std ; int a[1000], b[1000]; int main(){ int n,m; cin >> n >> m; for(int i=1; i<=n ; i++){ cin >> a[i]; } for(int i=1; i<=m; i++){ cin >> b[i]; } int cnt=0; for(int i=1 ;i<=n; i++){ while(next_permutation(b+1, b+m+1)){ int sum = 0; bool k=0; for(int h=1;h<=m;h++){ sum+=b[h]; if(sum == a[i]){ cnt++; k=1; for(int f=1; f<=h; f++){ b[f] = 0; } break; }1 } if(k)break; } } if(cnt == n) cout << "YES"; else { cout << "NO"; } }

Compilation message (stderr)

bank.cpp: In function 'int main()':
bank.cpp:28:7: error: expected ';' before '}' token
   28 |     }1
      |       ^
      |       ;
   29 |    }
      |    ~   
bank.cpp:28:6: warning: statement has no effect [-Wunused-value]
   28 |     }1
      |      ^