91222024-02-15 11:26:07IgnácSakktábla (75 pont)cpp17Accepted 75/753ms3396 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, m;
	cin >> n >> m;
	if (n == m) cout << (int)sqrt(2 * n);
	else cout << (int)sqrt(2 * min(n, m) + 1);
}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1876 KiB
2Accepted0/03ms2124 KiB
3Accepted5/53ms2316 KiB
4Accepted5/53ms2504 KiB
5Accepted5/52ms2592 KiB
6Accepted5/53ms2720 KiB
7Accepted5/52ms2816 KiB
8Accepted5/52ms2932 KiB
9Accepted5/52ms2932 KiB
10Accepted5/53ms2852 KiB
11Accepted7/72ms2960 KiB
12Accepted7/73ms3068 KiB
13Accepted7/73ms3304 KiB
14Accepted7/73ms3396 KiB
15Accepted7/73ms3376 KiB