- 画矩形
?????
- 2023-10-19 19:18:03 @
为啥这个过不了啊
// NOI.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
int x, y, g;
char charest;
cin >> x >> y >> charest >> g;
string stuff(x, charest);
cout << stuff << endl;
if (g == 0) {
string middle((x - 2), ' ');
for (int i = 0; i < y - 2; i++)
cout << charest << middle << charest << " " << endl;
cout << stuff << endl;
}
else {
for (int i = 0; i < y - 2; i++)
cout << stuff << endl;
}
cout << endl;
return 0;
}
Information
- ID
- 587
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- (None)
- # Submissions
- 150
- Accepted
- 69
- Uploaded By