結果
問題 | No.8083 12歳 |
ユーザー | okkuukenken |
提出日時 | 2021-04-01 22:06:58 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 541 bytes |
コンパイル時間 | 3,053 ms |
コンパイル使用メモリ | 225,224 KB |
最終ジャッジ日時 | 2025-01-20 06:49:55 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 366 |
ソースコード
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdtr1c++.h> #define int long long using namespace std; constexpr int mod=998244353; bool isuruu(int y){ if(y%400==0) return 1; if(y%100==0) return 0; return y%4==0; } signed main(){ int y,n,d; cin>>y>>n>>d; int all; bool a=isuruu(y-12),b=isuruu(y+1); all=a?366:365; if(a&&!b&&d>=334) d++; if(!a&&b&&d>=334) d--; cout<<max(0ll,n-d)<<' '<<min(n,all-d)<<endl; }