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

洛谷 P1424 小鱼的航程(改进版) 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P1424 小鱼的航程(改进版)

在文件 luogu.h202 行定义.

成员函数说明

◆ main()

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

在文件 luogu.cpp528 行定义.

528 {
529 unsigned short x;
530 unsigned int n;
531 cin >> x >> n;
532 x--;
533 unsigned int count = n / 7 * 5 * 250;
534 n %= 7;
535 for(unsigned int i = 0; i < n; i++) {
536 if((x + i) % 7 < 5) {
537 count += 250;
538 }
539 }
540 cout << count;
541 return 0;
542 }

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


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