CSES - Datatähti 2019 loppu - Results
Submission details
Task:Summa
Sender:Tuomas Katajisto
Submission time:2019-01-17 12:11:01 +0200
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:6:27: error: expected ';' before ')' token
   for(int i = 1; i <= 1000) {
                           ^
input/code.cpp:7:29: error: expected ';' before ')' token
     for(int j = 1; j <= 1000) {
                             ^
input/code.cpp:13:8: warning: unused variable 'cc' [-Wunused-variable]
   long cc = 0;
        ^~

Code

#include<bits/stdc++.h>
using namespace std;

int main() {
  long am[1001];
  for(int i = 1; i <= 1000) {
    for(int j = 1; j <= 1000) {
      if(i != j) {
	am[i+j]++;
      }
    }
  }
  long cc = 0;
  for(int i = 0; i < 1001; i++) am[i] /= 2;
  for(int i = 1; i <= 1000; i++) {
    
  }
}