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

洛谷 P5725 【深基4.习8】求三角形 更多...

#include <luogu.h>

静态 Public 成员函数

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

详细描述

洛谷 P5725 【深基4.习8】求三角形

在文件 luogu.h343 行定义.

成员函数说明

◆ main()

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

在文件 luogu.cpp1010 行定义.

1010 {
1011 int n;
1012 cin >> n;
1013 for(int i = 0; i < n; i++) {
1014 for(int j = 0; j < n; j++) {
1015 cout << setw(2) << setfill('0') << right << i * n + j + 1;
1016 }
1017 cout << endl;
1018 }
1019 int count = 1;
1020 cout << endl;
1021 for(int i = 0; i < n; i++) {
1022 for(int j = 0; j < n - i - 1; j++) {
1023 cout << " ";
1024 }
1025 for(int j = 0; j < i + 1; j++) {
1026 cout << setw(2) << setfill('0') << right << count++;
1027 }
1028 cout << endl;
1029 }
1030 return 0;
1031 }

引用了 acwing::acwing1929::right.

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


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