답안 #590687

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
590687 2022-07-06T08:42:32 Z Jakub_Wozniak Potatoes and fertilizers (LMIO19_bulves) C++14
24 / 100
270 ms 10844 KB
#include <bits/stdc++.h>
using namespace std;
long int bezw(long int j)
{
	if(j<0) j*=-1;
	return j;
}
int main()
{
	int N;
	cin >> N;
	int A[N+1],B[N+1];
	for(int i=0;i<N;i++)
	{
		cin >> A[i] >> B[i];
	}
	
	long int nadmiar=0;
	long int wynik=0;
	for(int i=0;i<N;i++)
	{
		nadmiar+=A[i]-B[i];
		wynik+=bezw(nadmiar);
	}
	cout << wynik;
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 2 ms 340 KB Output is correct
4 Correct 18 ms 920 KB Output is correct
5 Correct 35 ms 1692 KB Output is correct
6 Correct 134 ms 5560 KB Output is correct
7 Correct 270 ms 10844 KB Output is correct
8 Correct 224 ms 9072 KB Output is correct
9 Correct 205 ms 8412 KB Output is correct
10 Correct 133 ms 6104 KB Output is correct
11 Correct 132 ms 6096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 2 ms 340 KB Output is correct
4 Correct 18 ms 920 KB Output is correct
5 Correct 35 ms 1692 KB Output is correct
6 Correct 134 ms 5560 KB Output is correct
7 Correct 270 ms 10844 KB Output is correct
8 Correct 224 ms 9072 KB Output is correct
9 Correct 205 ms 8412 KB Output is correct
10 Correct 133 ms 6104 KB Output is correct
11 Correct 132 ms 6096 KB Output is correct
12 Incorrect 68 ms 2920 KB Output isn't correct
13 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Incorrect 0 ms 300 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 2 ms 340 KB Output is correct
4 Incorrect 0 ms 300 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 2 ms 340 KB Output is correct
4 Incorrect 0 ms 300 KB Output isn't correct
5 Halted 0 ms 0 KB -