35382023-02-28 20:04:45SleepyOverlordBimmbamm (30)cpp17Hibás válasz 3/303ms3368 KiB
#include <vector>
#include <string> 
#include <set> 
#include <map> 
#include <unordered_set>
#include <unordered_map>
#include <queue> 
#include <bitset> 
#include <stack>
#include <list>

#include <numeric> 
#include <algorithm> 
#include <random>
#include <chrono>

#include <cstdio>
#include <fstream>
#include <iostream> 
#include <sstream> 
#include <iomanip>
#include <climits>

#include <cctype>
#include <cmath> 
#include <ctime>
#include <cassert>

using namespace std;

#define ULL unsigned long long
#define LL long long
#define PII pair <int, int>
#define VB vector <bool>
#define VI vector <int>
#define VLL vector <LL>
#define VD vector <double>
#define VS vector <string>
#define VPII vector <pair <int, int> >
#define VVI vector < VI >
#define VVB vector < VB >
#define SI set < int >
#define USI unordered_set <int>
#define MII map <int, int>
#define UMII unordered_map <int, int>
#define MS multiset
#define US unordered_set
#define UM unordered_map
#define UMS unordered_multiset
#define UMM unordered_multimap

#define FORN(i, n) for(int i = 0; i < (n); ++i)
#define FOR(i, a, b) for(int i = (a); i <= (b); ++i)
#define FORD(i, a, b) for(int i = (a); i >= (b); --i)

#define SZ size()
#define BG begin() 
#define EN end() 
#define CL clear()
#define X first
#define Y second
#define RS resize
#define PB push_back
#define MP make_pair
#define ALL(x) x.begin(), x.end()
#define INS insert
#define ER erase
#define CNT count

#define IN_FILE "a.in"
#define OUT_FILE "a.out"

template <typename T>
void PR(T var1)
{
	cout << var1 <<endl;
}
template <typename T, typename... Types>
void PR(T var1, Types... var2)
{
	cout << var1;
	PR(var2...);
}

int n;

int main()
{
	cin >> n;
	FOR(i, 1, n)
	{
		string s;
		cin >> s;
		if (i % 3 == 0 && i % 5 == 0 && s != "BUMM")
		{
			PR(i);
			return 0;
		}
		else
		if (i % 3 == 0 && s != "BIMM")
		{
			PR(i);
			return 0;
		}
		else
		if (i % 5 == 0 && s != "BAMM")
		{
			PR(i);
			return 0;
		}
		else
		if (i % 3 != 0 && i % 5 != 0 && s != "SZAM")
		{
			PR(i);
			return 0;
		}
	}

	PR(0);
	return 0;
}
RészfeladatÖsszpontTesztVerdiktIdőMemória
base3/30
1Elfogadva0/03ms1820 KiB
2Hibás válasz0/03ms2004 KiB
3Hibás válasz0/33ms2248 KiB
4Hibás válasz0/32ms2332 KiB
5Elfogadva3/33ms2456 KiB
6Hibás válasz0/33ms2676 KiB
7Hibás válasz0/33ms2724 KiB
8Hibás válasz0/33ms2848 KiB
9Hibás válasz0/33ms2940 KiB
10Hibás válasz0/33ms3336 KiB
11Hibás válasz0/33ms3292 KiB
12Hibás válasz0/33ms3368 KiB