| 15172 | 2025-02-14 18:56:15 | Mrkz | Öntözés (50 pont) | cpp17 | Forditási hiba |
#include <iostream>
//#include <fstream>
using namespace std;
int x,A,y,B,Q,M;
int main()
{
ifstream f("kerdes.in");
cin>>Q>>M;
for(int i=1;i<=Q;i++){
cin>>A>>x>>B>>y;
int napsz=A;
int ora=x;
int ora2=0;
int vegora=y+((B-A)*24);
int ontozes=0;
while(napsz<=B && ora<vegora){
ora2=ora2+M;
if(ora2>=24){
napsz++;
ora2=ora2-24;
}
if(ora<vegora-M)
ontozes++;
ora=ora+M;
}
cout<<ontozes<<endl;
}
return 0;
}
open /var/local/lib/isolate/409/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:7:15: error: variable 'std::ifstream f' has initializer but incomplete type
7 | ifstream f("kerdes.in");
| ^