Submission #68529

# Submission time Handle Problem Language Result Execution time Memory
68529 2018-08-17T09:11:46 Z KLPP Boat (APIO16_boat) C++14
0 / 100
3 ms 504 KB
#include<iostream>
#include<stdio.h>

using namespace std;
typedef long long int lld;
#define MOD 1000000007

int main(){
	int n;
	cin>>n;
	pair<int,int> arr[n];
	for(int i=0;i<n;i++)cin>>arr[i].first>>arr[i].second;
	lld DP[n];
	lld ans=0;
	for(int i=0;i<n;i++){
		DP[i]=1;
		for(int j=0;j<i;j++){
			if(arr[j].first<arr[i].first){
				DP[i]+=DP[j];
				DP[i]%=MOD;
			}
		}
		ans+=DP[i];
	}
	cout<<ans<<endl;
	
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 504 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -