제출 #424869

#제출 시각아이디문제언어결과실행 시간메모리
424869A_DFibonacci representations (CEOI18_fib)C++14
0 / 100
2 ms288 KiB
#include <bits/stdc++.h>
#define int long long
#define ii pair<int,int>
#define F first
#define S second
#define du long double
using namespace std;
const int MOD=1e9+7;
void solve()
{
    int n,mx=0;
    cin>>n;
    while(n--){
        int a;
        cin>>a;
        mx=max(mx,a);
        int ans=(mx+1)/2;
        ans%=MOD;
        cout<<ans<<endl;
    }
}
main()
{
    int t=1;
    //cin>>t;
    while(t--)solve();
}

컴파일 시 표준 에러 (stderr) 메시지

fib.cpp:22:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   22 | main()
      | ^~~~
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…