Submission #9106

# Submission time Handle Problem Language Result Execution time Memory
9106 2014-09-27T12:09:33 Z wurikiji Penalty calculation (kriii2_PE) C++
0 / 4
0 ms 1676 KB
#include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <vector>
#include <stack>
using namespace std;

int main(void){
	int n;
	cin >> n;
	int cnt = 0;
	vector<int> vt,vs;
	int i = 0 ;
	int mx = 0;
	while(n--){
		int tt, ss;
		cin >> tt >> ss;
		vt.push_back(tt); vs.push_back(ss);
		if( mx < ss) {
			i = cnt;
			mx = ss;
		}
		cnt++;
	}
	int p =0;
	if( mx == 0) { p = 0;}
	else if (mx == 1 || mx == 4)
	{
		p = vt[i] + (i - 1 ) * 20;
	}

	cout<<p<<endl;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1676 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -