結果
| 問題 |
No.998 Four Integers
|
| コンテスト | |
| ユーザー |
sorag
|
| 提出日時 | 2022-08-16 18:00:52 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 495 bytes |
| コンパイル時間 | 905 ms |
| コンパイル使用メモリ | 100,940 KB |
| 最終ジャッジ日時 | 2024-11-15 02:28:22 |
| 合計ジャッジ時間 | 1,449 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:19:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
19 | sort(all(a));
| ^~~~
| sqrt
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define all(x) begin(x),end(x)
#define ll long long
#define P pair<int,int>
#define lP pait<ll,ll>
using namespace std;
int main() {
int cnt=0;
vector<int> a(4);
for(int i=0;i<4;i++){
cin>>a[i];
}
sort(all(a));
for(int i=0;i<3;i++){
if(a[i]+1==a[i+1]) cnt++;
}
if(cnt==3) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
sorag