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

AcWing 670. 动物 更多...

#include <acwing.h>

静态 Public 成员函数

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

详细描述

AcWing 670. 动物

在文件 acwing.h507 行定义.

成员函数说明

◆ main()

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

在文件 acwing.cpp1426 行定义.

1426 {
1427 string str1;
1428 string str2;
1429 string str3;
1430 cin >> str1 >> str2 >> str3;
1431 if(str1 == "vertebrado") {
1432 if(str2 == "ave") {
1433 if(str3 == "carnivoro") {
1434 cout << "aguia";
1435 } else {
1436 cout << "pomba";
1437 }
1438 } else {
1439 if(str3 == "onivoro") {
1440 cout << "homem";
1441 } else {
1442 cout << "vaca";
1443 }
1444 }
1445 } else {
1446 if(str2 == "inseto") {
1447 if(str3 == "hematofago") {
1448 cout << "pulga";
1449 } else {
1450 cout << "lagarta";
1451 }
1452 } else {
1453 if(str3 == "hematofago") {
1454 cout << "sanguessuga";
1455 } else {
1456 cout << "minhoca";
1457 }
1458 }
1459 }
1460 return 0;
1461 }

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


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