Hey, have you figured out what's wrong with your code? Mine's pretty similar, but I'm calculating the the number of invited people directly(by decrementing a variable from n by 1, everytime we come across a guest who can't be invited. But I'm getting 6 WAs :(
Could you help me out with this please?
#include <iostream>#include <vector>#include <fstream>#include <algorithm>using namespace std;int main() {ifstream fin("partyin.txt");ofstream fout("partyout.txt");int n,m,a,b;fin>>n>>m>>a>>b;b= n-b-1;vector<int> arr[n+1];