Submission #60725456


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define fastio cin.tie(0)->sync_with_stdio(0)
#define fi first
#define se second
#define nm (nl + nr >> 1)
#define xm (xl + xr >> 1)
#define pb(x) push_back(x)
#define all(v) (v).begin(), (v).end()
#define zip(v) (v).erase(unique(all(v)), (v).end())
#define dem_plc(x) cout << fixed << setprecision(x)
#define ox(t) cout << ((t) ? "YES" : "NO") << '\n'
#define continue(x) { cout << (x) << '\n'; continue; }
#define _exit(x) return cout << x, 0
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<pii, int> ppi;
typedef pair<int, pii> pip;
typedef pair<pll, ll> ppl;
typedef pair<ll, pll> plp;
const ll mod = 1e9 + 7; // 998244353
const ll INF = 2e9;
const ll LINF = 4e18;
const db PI = acos(-1);
const int N = 2e5 + 1;

int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};

// templete end

int main()
{
	fastio;
	int n, r; cin >> n >> r;
	while (n--) {
		int d, a; cin >> d >> a;
		if (d == 1) {
			if (1600 <= r && r < 2800) {
				r += a;
			}
		}
		else {
			if (1200 <= r && r < 2400) {
				r += a;
			}
		}
	}
	cout << r << '\n';
}

Submission Info

Submission Time
Task B - ARC Division
User HeeJaYaa
Language C++ 17 (gcc 12.2)
Score 200
Code Size 1301 Byte
Status AC
Exec Time 1 ms
Memory 3596 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 19
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 02_handmade_15.txt, 02_handmade_16.txt, 02_handmade_17.txt, 02_handmade_18.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3388 KiB
00_sample_01.txt AC 1 ms 3388 KiB
00_sample_02.txt AC 1 ms 3412 KiB
01_random_03.txt AC 1 ms 3528 KiB
01_random_04.txt AC 1 ms 3400 KiB
01_random_05.txt AC 1 ms 3416 KiB
01_random_06.txt AC 1 ms 3524 KiB
01_random_07.txt AC 1 ms 3412 KiB
01_random_08.txt AC 1 ms 3468 KiB
01_random_09.txt AC 1 ms 3464 KiB
01_random_10.txt AC 1 ms 3440 KiB
01_random_11.txt AC 1 ms 3464 KiB
01_random_12.txt AC 1 ms 3420 KiB
01_random_13.txt AC 1 ms 3524 KiB
01_random_14.txt AC 1 ms 3480 KiB
02_handmade_15.txt AC 1 ms 3524 KiB
02_handmade_16.txt AC 1 ms 3396 KiB
02_handmade_17.txt AC 1 ms 3444 KiB
02_handmade_18.txt AC 1 ms 3596 KiB