Submission #66468


ソースコード

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
//GIVE ME AC!!!!!!!!!!!!!!!!!
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define ll long long
#define floatset() fixed<<setprecision(15)
#define all(n) n.begin(),n.end()
#define rall(n) n.rbegin(),n.rend()
#define rep(i, s, n) for (ll i = s; i < (ll)(n); i++)
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ll inf =8223372036854775807;
const ll MOD=1000000007;
const ll mod=998244353;
const double pi=acos(-1);
using P=pair<ll,ll>;
int main(){
int n;
cin>>n;
if(n<=3){
cout<<2<<endl;
return 0;
}
cout<<(n*2+2)/3<<endl;
}

ステータス

項目 データ
問題 1452 - ホットケーキ
ユーザー名 MtSaka
投稿日時 2021-05-05 10:25:37
言語 C++17
状態 Accepted
得点 4
ソースコード長 663 Byte
最大実行時間 36 ms
最大メモリ使用量 804 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1 AC 26 ms 604 KB
1
in2 AC 20 ms 540 KB
1
in3 AC 20 ms 608 KB
1
in4 AC 24 ms 704 KB
1
in5 AC 35 ms 804 KB
1
in6 AC 18 ms 776 KB
1
in7 AC 23 ms 616 KB
1
in8 AC 32 ms 588 KB
1
in9 AC 24 ms 688 KB
1
in10 AC 36 ms 576 KB
1
in11 AC 17 ms 420 KB
1
in12 AC 28 ms 520 KB
1
in13 AC 21 ms 616 KB
1
in14 AC 31 ms 712 KB
1
in15 AC 21 ms 552 KB
1
in16 AC 25 ms 656 KB
1
in17 AC 24 ms 628 KB
1
in18 AC 26 ms 596 KB
1
in19 AC 21 ms 568 KB
1
in20 AC 18 ms 508 KB
1