結果

問題 No.1003 サイコロの実装 (1)
ユーザー hanachanXhanachanX
提出日時 2020-04-12 10:58:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,071 bytes
コンパイル時間 2,592 ms
コンパイル使用メモリ 179,640 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-22 00:55:06
合計ジャッジ時間 19,438 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1,195 ms
4,348 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,348 KB
testcase_08 WA -
testcase_09 AC 1,193 ms
4,348 KB
testcase_10 AC 1,191 ms
4,348 KB
testcase_11 AC 1,192 ms
4,348 KB
testcase_12 WA -
testcase_13 AC 1,194 ms
4,348 KB
testcase_14 AC 1,196 ms
4,348 KB
testcase_15 WA -
testcase_16 AC 240 ms
4,348 KB
testcase_17 AC 1,119 ms
4,348 KB
testcase_18 AC 495 ms
4,348 KB
testcase_19 WA -
testcase_20 AC 102 ms
4,348 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 976 ms
4,348 KB
testcase_25 AC 287 ms
4,348 KB
testcase_26 AC 1,197 ms
4,348 KB
testcase_27 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("O3")
#pragma GCC target("avx")
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
#define repr(i ,n) for(int i=n;i>(int)(n);--i)
#define rep1(i ,n) for(int i=1;i<=(int)(n);++i)
#define ALL(a) a.begin(), a.end()
#define SORT(a) sort(ALL(a))
#define bit_check(bit, i) ((bit>>(i)) & 1)
#define PRINT(x) printf("%d\n",(x));
using namespace std;
typedef long long int int64;
typedef unsigned long long uint64;
template<class T> using V = vector<T>;
using I = int;
using VI = V<I>;
const int INF = 2e9;
const int64 MOD = 1e9 + 7;

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;}

int val[(int)pow(2,16)+1];

int main(){
        int n; cin >> n;
        bool f = true;
        rep(i ,n){
            val[i]=(i%6+1);
        }
        rep(i ,n){
            for(int j = i + 1;j < n ;++j){
                if(val[i]==val[j]) f = false;
            }
        }
        cout << ( f ? "Yes" : "No") << endl;
}
0