7498 | 2024-01-09 11:08:57 | almadav | Kártyajáték | cpp17 | Forditási hiba |
#include <bits/stdc++.h>
using namespace std;
int main()
{
iostream::sync_with_stdio(0);
cin.tie(0);
unsigned long long n,k;
int pont =0;
cin >> n;
cin >> k;
bool nem;
vector<unsigned long long> alma;
vector<unsigned long long>alma2=alma;
unsigned long long current;
for(int i =0; i<k;i++)
{
cin >> current; alma.push_back(current);
}
sort(alma2.begin(), alma2.end())
alma2.push_back(n+1);
int j =0;
for(int i =0; i <k;i++)
{
igen = ture;
while(alma2[j]<=alma[i])
{
if(igen)pont++;
igen=false;
j++;
}
}
cout << pont;
}
exit status 1
main.cpp: In function 'int main()':
main.cpp:21:37: error: expected ';' before 'alma2'
21 | sort(alma2.begin(), alma2.end())
| ^
| ;
22 | alma2.push_back(n+1);
| ~~~~~
main.cpp:26:9: error: 'igen' was not declared in this scope
26 | igen = ture;
| ^~~~
main.cpp:26:16: error: 'ture' was not declared in this scope
26 | igen = ture;
| ^~~~
Exited with error status 1