Submission #59345


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <bits/stdc++.h>
#define rep(i, n) for(long long int i = 0; i < n; i++)
#define _rep(i, m, n) for(long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
//const int N = 1000000;
const ll mod = 1000000007;
using Graph = vector<vector<int>>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll A, ll B){
if(B == 0)return A;
return gcd(B, A % B);
}
ll lcm(ll A, ll B){
return A * B / gcd(A, B);
}
/*------------------------------------------------------------------*/
int main(){
string s; cin >> s;
if(s == "11" or s == "011" or s == "110" or s == "111")cout << "unsafe" << endl;
else cout << "safe" << endl;
}

ステータス

項目 データ
問題 1259 - Do not stick!
ユーザー名 Be11T_
投稿日時 2020-05-06 00:26:32
言語 C++14
状態 Accepted
得点 100
ソースコード長 746 Byte
最大実行時間 28 ms
最大メモリ使用量 708 KB

セット

セット 得点 Cases
1 ALL 100 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 25 ms 604 KB
1
in02.txt AC 24 ms 708 KB
1
in03.txt AC 24 ms 556 KB
1
in04.txt AC 23 ms 656 KB
1
in05.txt AC 28 ms 632 KB
1
in06.txt AC 21 ms 604 KB
1
in07.txt AC 25 ms 572 KB
1
in08.txt AC 24 ms 548 KB
1
in09.txt AC 23 ms 516 KB
1
in10.txt AC 27 ms 484 KB
1
sample01.txt AC 17 ms 584 KB
1
sample02.txt AC 15 ms 556 KB
1
sample03.txt AC 20 ms 656 KB
1
sample04.txt AC 26 ms 628 KB
1