結果
問題 |
No.396 クラス替え
|
ユーザー |
![]() |
提出日時 | 2025-05-16 15:13:01 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 2,991 ms |
コンパイル使用メモリ | 275,640 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-05-16 15:13:08 |
合計ジャッジ時間 | 6,048 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | freopen("class.in","r",stdin); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ main.cpp:8:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | freopen("class.out","w",stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll n,m,x,y; string ans[]={"NO","YES"}; int main(){ freopen("class.in","r",stdin); freopen("class.out","w",stdout); cin>>n>>m>>x>>y; x%=(m*2),y%=(m*2); cout<<ans[(x==y||(x+y==m*2+1))]; }