Submission #109289

# Submission time Handle Problem Language Result Execution time Memory
109289 2019-05-06T05:57:01 Z b2563125 Boat (APIO16_boat) C++14
0 / 100
4 ms 384 KB
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define vel vector<int>
#define rep(i,n) for(int i=0;i<n;i++)
int pr = 1000000007;
int ref(int &a) {
	a = a % pr;
	a += pr;
	a = a % pr;
	return a;
}
int main() {
	int n;
	cin >> n;
	vel a(n);
	vel b(n);
	rep(i, n) { cin >> a[i] >> b[i]; }
	vel ans(n, 1);
	int ret = 0;
	rep(i, n) {
		rep(j, i) {
			if (a[j] < a[i]) { ans[i] += ans[j]; ref(ans[i]); }
		}
		ret += ans[i]; ref(ans[i]);
	}
	cout << ret << endl;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -