結果
問題 |
No.1003 サイコロの実装 (1)
|
ユーザー |
![]() |
提出日時 | 2020-03-17 14:38:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 979 bytes |
コンパイル時間 | 3,970 ms |
コンパイル使用メモリ | 221,892 KB |
最終ジャッジ日時 | 2025-01-09 07:31:20 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) #define cinf(n,x) for(int i=0;i<(n);i++)cin>>x[i]; #define ft first #define sc second #define pb push_back #define lb lower_bound #define ub upper_bound #define all(v) (v).begin(),(v).end() #define mod 1000000007 using namespace std; typedef long long ll; template<class T> using V=vector<T>; using Graph = vector<vector<int>>; using P=pair<ll,ll>; typedef unsigned long long ull; typedef long double ldouble; template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } const ll INF=1e18; int main(){ ll n; cin>>n; map<ll,ll> mp; for(ll i=1;i<=6;i++) mp[i]=0; rep(i,n){ mp[i%6+1]++; } set<ll> st; for(ll i=1;i<=6;i++) st.insert(mp[i]); if(st.size()==1) cout<<"Yes"<<endl; else cout<<"No"<<endl; }