problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
acwing::acwing763类 参考

AcWing 763. 循环相克令 更多...

#include <acwing.h>

静态 Public 成员函数

static int main (istream &cin, ostream &cout)
 

详细描述

AcWing 763. 循环相克令

在文件 acwing.h1159 行定义.

成员函数说明

◆ main()

int acwing::acwing763::main ( istream &  cin,
ostream &  cout 
)
static

在文件 acwing.cpp3732 行定义.

3732 {
3733 int t;
3734 cin >> t;
3735 for(int i = 0; i < t; i++) {
3736 string str1;
3737 string str2;
3738 cin >> str1 >> str2;
3739 if(str1 == str2) {
3740 cout << "Tie";
3741 } else if(str1 == "Hunter" && str2 == "Gun" || str1 == "Gun" && str2 == "Bear" || str1 == "Bear" && str2 == "Hunter") {
3742 cout << "Player1";
3743 } else {
3744 cout << "Player2";
3745 }
3746 cout << endl;
3747 }
3748 return 0;
3749 }

被这些函数引用 acwing::TEST().


该类的文档由以下文件生成: