CSES - Datatähti 2023 alku - Results
Submission details
Task:Lehmät
Sender:fatihmerickoc
Submission time:2022-11-05 23:05:30 +0200
Language:C++ (C++11)
Status:COMPILE ERROR

Compiler report

input/code.cpp:1:10: fatal error: /Users/fatihmerickoc/stdc++.h: No such file or directory
    1 | #include "/Users/fatihmerickoc/stdc++.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Code

#include "/Users/fatihmerickoc/stdc++.h"
using namespace std;
 
int main()
{ 


    int lineNumber , heightnumber;
    cin >> lineNumber , heightnumber;
    int sequence[lineNumber];
    int inekSayisi = 7;
    string das;
    // count the frequency

    for (int i = 0; i < lineNumber; ++i)
    {
        cin >> sequence[i];
    }
    int arraySize = sizeof(sequence)/sizeof(sequence[0]);
 //   for (int i = 0; i < arraySize; i++)
    {
        if(sequence[i] == 1)
        {
            for (int f = 1; f < arraySize-i; f++)
            {
                if (sequence[i+f] == 2)
                {
                    inekSayisi++;
                }else if (sequence[i+f] == 1)
                {
                    break;
                }
        
            }
           
        }
    }
    cout << inekSayisi << endl;
    return 0;
}