Submission #905784
Source Code Expand
#include <sstream> #include <string> #include <vector> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <iostream> #include <cstdio> #include <cmath> #include <cstring> using namespace std; int main(){ int N; cin>>N; vector<int> a(N); for(int i=0;i<N;i++){ cin>>a[i]; } long long ret=0; for(int i=0;i<N;i++){ int Low=a[i]; for(int l=i;l<N;l++){ Low=min(a[l],Low); ret+=Low; } } cout<<ret<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Minimum Sum |
User | apolopt |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 520 Byte |
Status | TLE |
Exec Time | 2102 ms |
Memory | 1024 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0, example1, example2 |
All | corner0, corner1, corner2, corner3, example0, example1, example2, maxrand0, maxrand1, maxrand2, rand0, rand1, rand2 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
corner0 | TLE | 2102 ms | 1024 KB |
corner1 | TLE | 2102 ms | 1024 KB |
corner2 | AC | 3 ms | 256 KB |
corner3 | TLE | 2102 ms | 1024 KB |
example0 | AC | 3 ms | 256 KB |
example1 | AC | 3 ms | 256 KB |
example2 | AC | 2 ms | 256 KB |
maxrand0 | TLE | 2102 ms | 1024 KB |
maxrand1 | TLE | 2102 ms | 1024 KB |
maxrand2 | TLE | 2102 ms | 1024 KB |
rand0 | AC | 3 ms | 256 KB |
rand1 | AC | 3 ms | 256 KB |
rand2 | AC | 3 ms | 256 KB |