| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 765587 | edfearay11 | 금 캐기 (IZhO14_divide) | C++17 | 1089 ms | 1520 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define f(i,a,b) for(int i=a;i<b;i++)
#define af(i,a,b) for(int i=a;i>=b;i--)
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
const ll mod=1e9+7;
const int maxN=1e5+5;
const ll inf=1e12;
void go(){
ll n;
cin>>n;
vector<ll> v1,v2,v3;
ll a,b,c;
f(i,0,n){
cin>>a>>b>>c;
v1.PB(a);
v2.PB(b);
v3.PB(c);
}
ll g=0;
f(i,0,n){
ll en=0;
ll ini=i;
ll gl=0;
f(j,i,n){
en+=v3[j];
gl+=v2[j];
if(v1[j]-v1[i]<=en && gl>g) g=gl;
}
}
cout<<g<<"\n";
}
int main(){
//fastio;
int test=1;
//cin>>test;
f(i,1,test+1){
//cout<<"Case "<<i<<":\n";
go();
}
return 0;
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
