Submission #344387

# Submission time Handle Problem Language Result Execution time Memory
344387 2021-01-05T15:34:37 Z denisa Bigger segments (IZhO19_segments) C++14
0 / 100
1 ms 364 KB
#include <iostream>
#include<algorithm>
#include<math.h>

using namespace std;

int main() {
    int n, a, sum1, sum2, segm, i, x;

    cin>>n;
    for(i=1;i<=n;i++) {
            cin>>x;
    }
    cout<<n/(int)sqrt(n)+1;
    return 0;
}

Compilation message

segments.cpp: In function 'int main()':
segments.cpp:8:12: warning: unused variable 'a' [-Wunused-variable]
    8 |     int n, a, sum1, sum2, segm, i, x;
      |            ^
segments.cpp:8:15: warning: unused variable 'sum1' [-Wunused-variable]
    8 |     int n, a, sum1, sum2, segm, i, x;
      |               ^~~~
segments.cpp:8:21: warning: unused variable 'sum2' [-Wunused-variable]
    8 |     int n, a, sum1, sum2, segm, i, x;
      |                     ^~~~
segments.cpp:8:27: warning: unused variable 'segm' [-Wunused-variable]
    8 |     int n, a, sum1, sum2, segm, i, x;
      |                           ^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Incorrect 1 ms 364 KB Output isn't correct
4 Halted 0 ms 0 KB -