Submission #96685

# Submission time Handle Problem Language Result Execution time Memory
96685 2019-02-10T19:59:54 Z Rouge_Hugo Unija (COCI17_unija) C++14
0 / 100
7 ms 760 KB
#include <bits/stdc++.h>
using namespace std;

long long  a[100009];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	long long  x,y;
	int n;cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>x>>y;
		x/=2;
		y/=2;
		a[y]=max(a[y],x);
	}
	long long  sum=0;
	for(int i=1;i<10000;i++)
	{
		if (a[i]>a[i-1])
		{
			sum+=(a[i]-a[i-1])*(i-1)+a[i];
		}
		else sum+=a[i];
	}
	cout<<sum*4;

 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 3 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
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 7 ms 760 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 632 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -