Submission #161526

#TimeUsernameProblemLanguageResultExecution timeMemory
161526ToniBOlivander (COCI18_olivander)C++14
0 / 50
4 ms400 KiB
#include <iostream> #include <algorithm> using namespace std; int main(){ int n, x, y; cin >> n; int listx[n], listy[n], sol; for(int i = 0; i < n; i++){ cin >> x; listx[i] = x; } for(int i = 0; i < n; i++){ cin >> y; listy[i] = y; } sort(listx, listx + n); sort(listy, listy + n); for(int i = 0; i < n; i++){ if(listy[i] >= listx[i]){ sol += 1; } } if(sol == n){ cout << "DA"; } else{ cout << "NE"; } return 0; }

Compilation message (stderr)

olivander.cpp: In function 'int main()':
olivander.cpp:28:2: warning: 'sol' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if(sol == n){
  ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...