제출 #93336

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
933362019-01-07 15:18:383zpK개의 묶음 (IZhO14_blocks)C++14
0 / 100
20 ms11512 KiB
#include<bits/stdc++.h>
using namespace std;
const int mn = 100009, mk = 109;
int f[mn][mk], n, k;
int l[mn], r[mn], a[mn];
vector<int> v[mn];
int dp[mn][mk];
void upd(int i, int j, int d){
i = n + 1 - i;
while(i <= n + 1){
f[i][j] = min(f[i][j], d);
i += (i & -i);
}
}
int cnt(int i, int j){
i = n + 1 - i;
int ans = 1e9;
while(i){
ans = min(ans, f[i][j]);
i -= (i & -i);
}
return ans;
}
main(){
cin >> n >> k;
for(int i = 1; i <= n; i++){
cin >> a[i];
}
stack<int> S;
for(int i = 1; i <= n; i++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

blocks.cpp:24:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
blocks.cpp: In function 'int main()':
blocks.cpp:68:33: warning: division by zero [-Wdiv-by-zero]
     if(dp[n][k] == 1e9) cout <<1/0;
                                ~^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...