結果
| 問題 | No.3740 Troublesome Congestion |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-08-12 16:07:20 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 1,193 bytes |
| 記録 | |
| コンパイル時間 | 2,683 ms |
| コンパイル使用メモリ | 85,988 KB |
| 実行使用メモリ | 48,308 KB |
| 最終ジャッジ日時 | 2026-09-19 12:38:47 |
| 合計ジャッジ時間 | 7,600 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| 部分点1 | 20 % | AC * 7 |
| 部分点2 | 30 % | AC * 7 WA * 5 |
| 満点 | 50 % | AC * 7 WA * 19 |
| 合計 | 4 * 20% = 80 点 |
ソースコード
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t = 0; t < T; t++){
long M = sc.nextLong();
System.out.println(40);
char[][] ans = new char[40][40];
for(int i = 0;i < 40;i++){
for(int j = 0;j < 40; j++){
ans[i][j] = (i < 39 && j < 39) ? '#' : '.';
}
}
for(int i = 0;i < 18;i++){
for(int a = 0; a < (i%2==0 ? 2 : 3); a++){
for(int b = 0; b < (i%2==0 ? 3 : 2); b++){
ans[i * 2 + a][i * 2 + b] = '.';
}
}
if(M % 3 > 0){
for(int j = i * 2; j < 40; j++){
ans[i * 2][j] = '.';
}
}
if(M % 3 > 1){
for(int j = i * 2; j < 40; j++){
ans[j][i * 2] = '.';
}
}
M /= 3;
}
if(M > 0){
ans[36][36] = '.';
ans[36][37] = '.';
ans[36][38] = '.';
}
if(M > 1){
ans[37][36] = '.';
ans[38][36] = '.';
}
ans[0][1] = 'P';
ans[1][0] = 'P';
StringBuilder sb = new StringBuilder();
for(int i = 0;i < 40;i++){
for(int j = 0;j < 40; j++){
sb.append(ans[i][j]);
}
sb.append("\n");
}
System.out.println(sb.toString());
}
}
}