Submission #497470

#TimeUsernameProblemLanguageResultExecution timeMemory
497470NalrimetGrowing Vegetable is Fun 3 (JOI19_ho_t3)C++17
0 / 100
0 ms204 KiB
#include <bits/stdc++.h> #pragma GCC optimization("g", on) #pragma GCC optimize ("inline") #pragma GCC optimization("03") #pragma GCC optimization("unroll-loops") #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #define ll long long #define pb push_back #define F first #define S second using namespace std; const int N = 1e6 + 5; const int inf = 1e9 + 7; int n, m, l, r, k, a[N]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m; for(int i = 1; i <= n; ++i){ cin >> a[i]; } while(m--){ cin >> l >> r >> k; bool ok = 1; for(int i = l; i < r; i++){ for(int j = i + 1; j <= r; j++){ if(a[i] > a[j]){ if(a[i] + a[j] > k){ ok = 0; break; } } } if(!ok) break; } cout << ok << '\n'; } return 0; }

Compilation message (stderr)

joi2019_ho_t3.cpp:3: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
    3 | #pragma GCC optimization("g", on)
      | 
joi2019_ho_t3.cpp:5: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
    5 | #pragma GCC optimization("03")
      | 
joi2019_ho_t3.cpp:6: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
    6 | #pragma GCC optimization("unroll-loops")
      | 
joi2019_ho_t3.cpp:7: warning: ignoring '#pragma comment ' [-Wunknown-pragmas]
    7 | #pragma comment(linker, "/stack:200000000")
      |
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...