Submission #795890

#TimeUsernameProblemLanguageResultExecution timeMemory
795890baneGap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; const int mod = (int)1e9 + 7; int a[501], b[501]; void solve(){ int n; cin >> n; for (int i = 0; i < n; i++){ cin >> a[i] >> b[i]; } long long dp[n]; long long ans = 0; for (int i = 0; i < n; i++){ dp[i] = 1; for (int j = i - 1; j >= 0; j--){ if (a[i] > a[j])dp[i] += dp[j]; dp[i] %= mod; } ans += dp[i]; ans %= mod; } cout << ans << endl; } int main(){ ios::sync_with_stdio(0); cin.tie(0); solve(); return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccgcnv6I.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccGgGKmM.o:gap.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccgcnv6I.o: in function `main':
grader.cpp:(.text.startup+0x1b7): undefined reference to `findGap(int, int)'
collect2: error: ld returned 1 exit status