제출 #1033554

#제출 시각아이디문제언어결과실행 시간메모리
1033554DuongkobeoStove (JOI18_stove)C++17
0 / 100
0 ms344 KiB
#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;
}

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

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...