제출 #105501

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1055012019-04-13 00:42:06onjo0127Pinball (JOI14_pinball)C++11
100 / 100
323 ms14260 KiB
#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL * 1e18;
vector<int> S;
int A[100009], B[100009], C[100009], D[100009];
long long lm[100009], rm[100009];
struct segtree {
vector<long long> T;
segtree(int N) {
T.resize(4*N, 0);
}
void upd(int idx, int s, int e, int x, long long y) {
if(x < s || e < x) return;
if(s == e) {
T[idx] = y;
return;
}
int m = s+e >> 1;
upd(idx*2, s, m, x, y);
upd(idx*2+1, m+1, e, x, y);
T[idx] = min(T[idx*2], T[idx*2+1]);
}
long long mn(int idx, int s, int e, int l, int r) {
if(r < s || e < l) return INF;
if(l <= s && e <= r) return T[idx];
int m = s+e >> 1;
return min(mn(idx*2, s, m, l, r), mn(idx*2+1, m+1, e, l, r));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

pinball.cpp: In member function 'void segtree::upd(int, int, int, int, long long int)':
pinball.cpp:21:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
         int m = s+e >> 1;
                 ~^~
pinball.cpp: In member function 'long long int segtree::mn(int, int, int, int, int)':
pinball.cpp:29:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
         int m = s+e >> 1;
                 ~^~
pinball.cpp: In function 'int main()':
pinball.cpp:35:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     int M, N; scanf("%d%d",&M,&N);
               ~~~~~^~~~~~~~~~~~~~
pinball.cpp:37:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d%d%d",&A[i],&B[i],&C[i],&D[i]);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...