結果

問題 No.906 Y字グラフ
ユーザー %20%20
提出日時 2018-08-15 23:48:00
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 228 bytes
コンパイル時間 2,050 ms
コンパイル使用メモリ 200,928 KB
実行使用メモリ 7,696 KB
最終ジャッジ日時 2023-10-24 17:33:54
合計ジャッジ時間 7,225 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 54 ms
4,348 KB
testcase_17 AC 64 ms
4,348 KB
testcase_18 AC 116 ms
4,348 KB
testcase_19 AC 144 ms
4,348 KB
testcase_20 AC 219 ms
4,348 KB
testcase_21 AC 267 ms
4,348 KB
testcase_22 AC 327 ms
4,348 KB
testcase_23 AC 328 ms
4,348 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main(){cin.tie(0);ios::sync_with_stdio(false);
      | ^~~~

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

const int MD=1e9+7;

main(){cin.tie(0);ios::sync_with_stdio(false);
	long long N,x=0;
	cin>>N;
	N-=4;
	for(long long i=0;i<=N/3;++i){
		x+=(N-3*i)/2+1;
		x%=MD;
	}
	cout<<x<<endl;
}
0