文章目录
AtCoder Beginner Contest 207
A - Repression
题意:
题解:
代码:
#include <bits/stdc++.h>
#define int long long
#define debug(x) cout << #x << " = " << x << endl;
using namespace std;
inline int read() {
int s = 0, w = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') w = -1; ch = getchar();}
while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
return s * w;
}
int const MAXN = 2e5 + 10;
int n, m, T;
signed main() {
cin >> n;
int tmp = (int)floor((double)n * 1.08);
if (tmp < 206) cout << "Yay!";
else if (tmp == 206) cout << "so-so";
else cout << ":(";
return 0;
}
B - Hydrate
题意:
题解:
代码:
#include <bits/stdc++.h>
#define int long long
#define debug(x) cout << #x << " = " << x << endl;
using namespace std;
inline int read() {
int s = 0, w = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') w = -1; ch = getchar();}
while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
return s * w;
}
int const MAXN = 2e5 + 10;
int n, m, T;
signed main() {
cin >> n;
for (int i = 1; i <= n; ++i) {
if ((i + 1) * i / 2 >= n) {
cout << i << endl;
return 0;
}
}
return 0;
}
C - Many Segments
题意:
题解:
代码:
#include <bits/stdc++.h>
#define int long long
#define debug(x) cout << #x << " = " << x << endl;
using namespace std;
inline int read(