Submission #6974134
Source Code Expand
#include<bits/stdc++.h> using namespace std; int n,a[10000000]; int main() { scanf("%d",&n) for(int i=1;i<=n;i++)scanf("%d",&a[i]); sort(a+1,a+n+1); printf("%d\n",a[1]) }
Submission Info
Submission Time | |
---|---|
Task | B - おいしいたこ焼きの食べ方 |
User | luogu_bot4 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 195 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:7:5: error: expected ‘;’ before ‘for’ for(int i=1;i<=n;i++)scanf("%d",&a[i]); ^ ./Main.cpp:7:17: error: ‘i’ was not declared in this scope for(int i=1;i<=n;i++)scanf("%d",&a[i]); ^ ./Main.cpp:10:1: error: expected ‘;’ before ‘}’ token } ^ ./Main.cpp:7:16: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for(int i=1;i<=n;i++)scanf("%d",&a[i]); ^