Submission #1033554

# Submission time Handle Problem Language Result Execution time Memory
1033554 2024-07-25T03:44:38 Z Duongkobeo Stove (JOI18_stove) C++17
0 / 100
0 ms 344 KB
#include<bits/stdc++.h>
#define endl "\n"
#define pb push_back
#define rs resize
#define gcd __gcd
using namespace std;
void solve() {
    int n, k; cin >> n >> k;
    vector<int> a(n), s(n);
    for (int i = 0; i < n; ++i) cin >> a[i];
    long long ans = a[n - 1] - a[0] + 1;
    for (int i = 0; i < n - 1; ++i) s[i] = a[i + 1] + a[i] - 1;
    sort(s.begin(), s.end());
    
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    // int t; cin >> t;
    // while (t--) 
        solve();
    return 0;
}

Compilation message

stove.cpp: In function 'void solve()':
stove.cpp:11:15: warning: unused variable 'ans' [-Wunused-variable]
   11 |     long long ans = a[n - 1] - a[0] + 1;
      |               ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -