Submission #285112

#TimeUsernameProblemLanguageResultExecution timeMemory
2851123zpDischarging (NOI20_discharging)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define ll long long using namespace std; main(){ ios_base::sync_with_stdio(false); cin.tie(0); int n; cin>>n; for(int i = 1;i <= n;i++){ cin >> t[i]; } cout<<t[1]*n<<endl; }

Compilation message (stderr)

Discharging.cpp:4:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      |      ^
Discharging.cpp: In function 'int main()':
Discharging.cpp:10:16: error: 't' was not declared in this scope
   10 |         cin >> t[i];
      |                ^
Discharging.cpp:12:11: error: 't' was not declared in this scope
   12 |     cout<<t[1]*n<<endl;
      |           ^