Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- ll ans = 0;
- set <string> ss;
- vector <string> anss;
- string sss, s1, s3;
- char s2[5];
- int f(int i){
- cout << "Character " << i << " finds out the secret." << endl;
- ans++;
- return 0;
- }
- int s(int i, int j){
- cout << "Character " << i << " finds out that character " << j << " does not know the secret." << endl;;
- ans++;
- return 0;
- }
- int t(int i, int j){
- cout << "Character " << i << " finds out that character " << j << " knows the secret." << endl;
- ans++;
- return 0;
- }
- int main()
- {
- ll k;
- for (int i = 0; i < 5; i++)
- s2[i] = '\0';
- cin >> k;
- for (int i = 1; i <= k; i++){
- f(i);
- for (int j = 1; j <= k; j++){
- if (j != 1 && i < j)
- s(i, j);
- if (j != k && i != j)
- t(j, i);
- }
- }
- cout << "The end. No secret now!" << endl;
- cout << ans + 1 << " " << 2 * k * k - 3 * k + 4 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement