Submission #61554169


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;
int T[105], L[105];
int main(){
int n, d;
cin >> n >> d;
for(int i = 1; i <= n; i ++) {
cin >> T[i] >> L[i];
}
for(int i = 1; i <= d; i ++) {
int Max = 0;
for(int j = 1; j <= n; j ++) {
Max = max(Max, T[j] * (L[j] + i));
}
cout << Max << '\n';
}
return 0;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<bits/stdc++.h>

using namespace std;

int T[105], L[105];

int main(){
	int n, d;
	cin >> n >> d;
	for(int i = 1; i <= n; i ++) {
		cin >> T[i] >> L[i];
	}
	for(int i = 1; i <= d; i ++) {
		int Max = 0;
		for(int j = 1; j <= n; j ++) {
			Max = max(Max, T[j] * (L[j] + i));
		}
		cout << Max << '\n';
	}
	return 0;
} 

Submission Info

Submission Time
Task B - Heavy Snake
User yuhong056
Language C++ 20 (gcc 12.2)
Score 200
Code Size 346 Byte
Status AC
Exec Time 1 ms
Memory 3648 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 14
Set Name Test Cases
Sample sample00.txt, sample01.txt
All sample00.txt, sample01.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt
Case Name Status Exec Time Memory
sample00.txt AC 1 ms 3576 KB
sample01.txt AC 1 ms 3644 KB
testcase00.txt AC 1 ms 3452 KB
testcase01.txt AC 1 ms 3560 KB
testcase02.txt AC 1 ms 3508 KB
testcase03.txt AC 1 ms 3456 KB
testcase04.txt AC 1 ms 3440 KB
testcase05.txt AC 1 ms 3492 KB
testcase06.txt AC 1 ms 3488 KB
testcase07.txt AC 1 ms 3648 KB
testcase08.txt AC 1 ms 3492 KB
testcase09.txt AC 1 ms 3436 KB
testcase10.txt AC 1 ms 3644 KB
testcase11.txt AC 1 ms 3400 KB


2025-04-04 (Fri)
05:11:51 +00:00