제출 #1273743

#제출 시각아이디문제언어결과실행 시간메모리
1273743Owen11Foehn Phenomena (JOI17_foehn_phenomena)C11
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; # define int long long # define fir first # define sec second # define emp emplace # define empb emplace_back # define endl "\n" const int cnst = 2e5+5; bool mutipletestcase = 0; //bool debug = false; void solve() { int n, q, s, t; cin >> n >> q >> s >> t; s *= -1; int all[n+5]; all[0] = 0; int arr[n+5]; arr[n+1] = 0; for(int i = 0 ; i<=n; i++) cin >> all[i]; for(int i = 1; i<=n; i++) arr[i] = all[i-1]-all[i]; int ans = 0; for(int i = 1; i<=n; i++) { if(arr[i] < 0) ans += s*abs(arr[i]); else ans += t*abs(arr[i]); } // cerr << ans << endl; while(q--) { int x, y, z; cin >> x >> y >> z; if(arr[x] < 0) ans -= s*abs(arr[x]); else ans -= t*abs(arr[x]); if(y != n) { if(arr[y+1] < 0) ans -= s*abs(arr[y+1]); else ans -= t*abs(arr[y+1]); } arr[x] -= z; arr[y+1] += z; if(arr[x] < 0) ans += s*abs(arr[x]); else ans += t*abs(arr[x]); if(y != n) { if(arr[y+1] < 0 && y != n) ans += s*abs(arr[y+1]); else ans += t*abs(arr[y+1]); } cout << ans << endl; } } signed main() { ios_base::sync_with_stdio(false); cin.tie(0); int t = 1; if(mutipletestcase) cin >> t; while(t--) solve(); }

컴파일 시 표준 에러 (stderr) 메시지

foehn_phenomena.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.