結果
| 問題 |
No.906 Y字グラフ
|
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2018-08-15 23:48:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 228 bytes |
| コンパイル時間 | 2,130 ms |
| コンパイル使用メモリ | 192,840 KB |
| 最終ジャッジ日時 | 2025-01-06 12:20:51 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 TLE * 1 |
| other | AC * 21 TLE * 7 |
コンパイルメッセージ
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);
| ^~~~
ソースコード
#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;
}
%20