# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
47586 |
2018-05-05T06:50:08 Z |
marvenlee |
Boat (APIO16_boat) |
C++14 |
|
2 ms |
376 KB |
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int increase=1;
int dp[n];
int a[n];
int b[n];
for(int i=0;i<n;i++)
cin >> a[i] >> b[i];
dp[0]=1;
for(int i=1;i<n;i++)
{
if(a[i]>a[i-1])
{
increase += increase+1;
dp[i] = 2*dp[i-1] +1;
}
else
{
dp[i] = dp[i-1]+increase;
}
}
cout << dp[n-1];
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |