結果
| 問題 |
No.508 超ゆとり教育
|
| コンテスト | |
| ユーザー |
Dameningen
|
| 提出日時 | 2017-04-28 22:38:57 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,178 bytes |
| コンパイル時間 | 884 ms |
| コンパイル使用メモリ | 88,376 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 18:10:07 |
| 合計ジャッジ時間 | 2,440 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 7 |
ソースコード
#include<string>
#include<vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<list>
#include<set>
#include<map>
#include<cstring>
#include<sstream>
#include<cassert>
#define X first
#define Y second
#define pb push_back
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define repe(X,Y) for ((X) = 0;(X) < (Y);++(X))
#define peat(X,Y) for (;(X) < (Y);++(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
int main()
{
ll s;
cin >> s;
for (ll i = 0; i < s; ++i) {
if (i < 1000000 && s <= 3 * (i + 1e6) * (i + 1e6)) {
cout << i << endl;
return 0;
}
if (i >= 1e6 && 3*(i-1e6)*(i-1e6) <= s && s <= 3*(i+1e6)*(i+1e6)) {
cout << i << endl;
return 0;
}
}
return 0;
}
Dameningen