Submission #553243

# Submission time Handle Problem Language Result Execution time Memory
553243 2022-04-25T08:02:13 Z kappa Autići (COCI22_autici) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h> //bakarız bakarız
using namespace std;
typedef long long ll;
#define pb push_back
#define st first
#define nd second
#define MOD 1000000007
typedef pair<ll, ll> pii;

const ll maxn = 2e5 + 5;

int main(){
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        ll x;
        cin >> x;
        sum += x;
        mn = min(mn, x);
    }
    cout << (n - 2) * mn + sum;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:13:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   13 |     cin >> n;
      |            ^
      |            yn
Main.cpp:18:9: error: 'sum' was not declared in this scope
   18 |         sum += x;
      |         ^~~
Main.cpp:19:9: error: 'mn' was not declared in this scope; did you mean 'yn'?
   19 |         mn = min(mn, x);
      |         ^~
      |         yn
Main.cpp:21:23: error: 'mn' was not declared in this scope; did you mean 'yn'?
   21 |     cout << (n - 2) * mn + sum;
      |                       ^~
      |                       yn
Main.cpp:21:28: error: 'sum' was not declared in this scope
   21 |     cout << (n - 2) * mn + sum;
      |                            ^~~