| 18250 | 2025-10-16 10:49:31 | dfehervari | Úthasználati díj (75 pont) | cpp17 | Compilation error |
#include<iostream>
#include<vector>
#include<string>
int main(){
#std::cout<<"Úthasználati díj\n";
int N,k,db,i,j,utak;
std::cin>>N>>k;
std::vector<int> U(N);
for(int i=0;i<N;++i){
std::cin>>U[i];
}
db=0;
i=0;
utak=0;
while(i<N){
while(i<N and U[i]==0) ++i;
if(i<N){
db=1;
j=i+1;
while(j<N and db<k){
if (U[j]==1){
utak+=1;
db+=1;
}
++j;
}
}
++i;
}
std::cout<<utak;
return 0;
}open /var/local/lib/isolate/444/box/a.out: no such file or directory
main.cpp:6:6: error: invalid preprocessing directive #std
6 | #std::cout<<"Úthasználati díj\n";
| ^~~