結果
| 問題 |
No.920 あかあお
|
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2019-12-19 00:58:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,010 bytes |
| コンパイル時間 | 1,730 ms |
| コンパイル使用メモリ | 173,364 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-07-06 23:12:07 |
| 合計ジャッジ時間 | 2,291 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// #define DEBUG
void shave(vector<int> &v, int n)
{
vector<int> x, y;
int n_sq = sqrt(n) + 1;
for (int i = 3; i < n + 1; i += 2)
{
x.push_back(i);
}
for (int i = 3; i < n_sq; i += 2)
{
for (auto itr = x.begin(); itr != x.end(); itr++)
{
if (*itr == i || *itr % i != 0)
y.push_back(*itr);
}
x.clear();
x = y;
y.clear();
}
if (n >= 2)
x.insert(x.begin(), 2);
for (auto itr = x.begin(); itr != x.end(); itr++)
{
v.push_back(*itr);
}
}
int main(){
#ifdef DEBUG
cout << "DEBUG MODE" << endl;
ifstream in("input.txt"); //for debug
cin.rdbuf(in.rdbuf()); //for debug
#endif
int x, y, z, p, q, w;
cin >> x >> y >> z;
w = 0;
for (int i = 0; i < z; i++){
p = x + i, q = y + z - i;
w = max(w, min(p, q));
}
cout << w << endl;
return 0;
}
Konton7