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

洛谷 P1319 压缩技术 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P1319 压缩技术

在文件 luogu.h474 行定义.

成员函数说明

◆ main()

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

在文件 luogu.cpp1631 行定义.

1631 {
1632 int n;
1633 cin >> n;
1634 bool zero = false;
1635 int count = 0;
1636 for(int i = 0; i < n * n; i++) {
1637 while(count == 0) {
1638 cin >> count;
1639 zero = !zero;
1640 }
1641 if(zero) {
1642 cout << 0;
1643 } else {
1644 cout << 1;
1645 }
1646 count--;
1647 if((i + 1) % n == 0) {
1648 cout << endl;
1649 }
1650 }
1651 return 0;
1652 }

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


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