Submission #40394

#TimeUsernameProblemLanguageResultExecution timeMemory
40394szawinisOlivander (COCI18_olivander)C++14
50 / 50
2 ms736 KiB
#include <bits/stdc++.h> using namespace std; int n, a[101], b[101]; int main() { scanf("%d", &n); for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 0; i < n; i++) cin >> b[i]; sort(a, a+n); sort(b, b+n); bool ans = true; for(int i = 0; i < n; i++) ans &= a[i] <= b[i]; if(ans) printf("DA"); else printf("NE"); }

Compilation message (stderr)

olivander.cpp: In function 'int main()':
olivander.cpp:6:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &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...