結果
| 問題 |
No.2392 二平方和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-28 23:08:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 4,396 bytes |
| コンパイル時間 | 1,757 ms |
| コンパイル使用メモリ | 167,748 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-06 21:08:30 |
| 合計ジャッジ時間 | 2,566 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 15 |
ソースコード
#define ll long long
#define max(a, b) max(ll(a), ll(b));
#define min(a, b) min(ll(a), ll(b));
#include <bits/stdc++.h>
#include <locale>
#include <algorithm>
using namespace std;
#ifdef LOCAL
#include "debugger.cpp"
#else
#define debug(...)
#endif
#define pb push_back
#define MOD 1000000007
#define PI 3.1415926535897932384626433832795
#define vi vector<int>
#define vll vector<ll>
bool prime(ll a) { if (a==1) return 0; for (int i=2;i<=round(sqrt(a));++i) if (a%i==0) return 0; return 1; }
#define all(a) (a).begin(), (a).end()
#define rep(i, a, b) for(ll i=a; i<b; i++)
bool chk(const std::pair<int, int>& a, const std::pair<int, int>& b) {
if (a.first != b.first) {
return a.first < b.first;
}
return a.second > b.second;
}
void solve(){
int n;
cin >> n;
rep(i,1,n/2+1){
if(i*i + (n-i) * (n-i) == n){
cout << "Yes";return;
}
}
cout << "No";
}
int main(){
auto start = chrono::high_resolution_clock::now();
ios::sync_with_stdio(false);
cin.tie(nullptr);
int tests = 1;
//cin >> tests;
while(tests--){
solve();
cout << '\n';
}
#ifdef LOCAL
cout << "\n__________________________" << endl;
auto duration = chrono::duration_cast<chrono::microseconds>(chrono::high_resolution_clock::now() - start);
cout << "time: " << (double)(duration.count())/1000.0 << " ms" << endl;
#endif
/*
}
}
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦_¯_¯_¯_¯_¯¦¦¦¦¦_¯_¯_¯_¯_¯_¯¦¦¦¦¦¦¦_¯_¯_¯¦¦¦¦¦_¯_¯_¯_¯_¯¦¦¦¦¦_¯_¯¦¦¦¦¦¦_¯_¯¦¦¦¦¦_¯_¯_¯_¯_¯¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯¦¦¦
¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯_¯_¯_¯_¯¦¦¦¦¦¦_¯¦¦¦
¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯_¯¦¦_¯_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦
¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯_¯_¯¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦
¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯_¯_¯_¯_¯_¯¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯_¯_¯_¯_¯¦¦¦¦¦¦¦¦¦_¯_¯_¯¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦
¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯_¯_¯¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦
¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯_¯¦¦_¯_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦
¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦¦¦_¯¦¦¦¦¦¦_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯_¯_¯_¯_¯¦¦¦
¦¦¦_¯_¯_¯_¯_¯¦¦¦¦¦_¯¦¦¦¦¦¦_¯_¯_¯¦¦¦¦¦_¯_¯_¯¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦_¯_¯¦¦¦¦¦¦_¯_¯¦¦¦¦¦_¯_¯_¯_¯_¯¦¦¦¦¦_¯¦¦¦¦¦¦¦¦¦¦¦¦¦¦_¯¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
*/
/* Orifkhon Telegram username : @orifkhon_husanov_off */
}