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

洛谷 P4414 [COCI2006-2007#2] ABC 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P4414 [COCI2006-2007#2] ABC

在文件 luogu.h227 行定义.

成员函数说明

◆ main()

int luogu::P4414::main ( istream &  cin,
ostream &  cout 
)
static

在文件 luogu.cpp615 行定义.

615 {
616 unsigned int num[3];
617 cin >> num[0] >> num[1] >> num[2];
618 unsigned a = 100;
619 unsigned b;
620 unsigned c = 0;
621 for(const unsigned int i: num) {
622 if(a > i) {
623 a = i;
624 }
625 if(c < i) {
626 c = i;
627 }
628 }
629 for(const unsigned int i: num) {
630 if(i != a && i != c) {
631 b = i;
632 }
633 }
634 char ch;
635 for(int i = 0; i < 3; i++) {
636 cin >> ch;
637 if(ch == 'A') {
638 cout << a << " ";
639 } else if(ch == 'B') {
640 cout << b << " ";
641 } else {
642 cout << c << " ";
643 }
644 }
645 return 0;
646 }

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


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