Submission #526680

#TimeUsernameProblemLanguageResultExecution timeMemory
526680Hydroxic_AcidAutići (COCI22_autici)C++14
0 / 50
1 ms204 KiB
#include <iostream> #include <queue> using namespace std; #define ll long long int N; ll length[100005]; int main(){ freopen("test.txt", "r", stdin); cin >> N; ll minn = 1000000000; for(int i = 0; i < N; i++){ cin >> length[i]; minn = min(minn, length[i]); } ll summ = minn * N; for(int i = 0; i < N; i++){ summ += length[i]; } summ -= minn; summ -= minn; cout << summ; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:10:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     freopen("test.txt", "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...