結果
| 問題 |
No.2920 Blood Type
|
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2024-10-12 19:20:26 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 77 ms / 2,000 ms |
| コード長 | 1,080 bytes |
| コンパイル時間 | 17,585 ms |
| コンパイル使用メモリ | 166,772 KB |
| 実行使用メモリ | 184,108 KB |
| 最終ジャッジ日時 | 2024-10-12 19:20:51 |
| 合計ジャッジ時間 | 20,910 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (114 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
public class Hello
{
static void Main()
{
var s = Console.ReadLine().Trim();
var t = Console.ReadLine().Trim();
getAns(s, t);
}
static int[] check(string s)
{
var res = new int[2];
for (int i = 0; i < 2; i++) res[i] = s[i] - 'A';
return res;
}
static int check2(int x, int y)
{
if (x == 0)
{
if (y == 1) return 2;
else return 0;
}
else if (x == 1)
{
if (y == 0) return 2;
else return 1;
}
else
{
if (y == 0) return 0;
else if (y == 1) return 1;
else return 3;
}
}
static void getAns(string s, string t)
{
var p1 = check(s);
var p2 = check(t);
var aa = new int[4];
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 2; j++)
{
aa[check2(p1[i], p2[j])] += 25;
}
}
Console.WriteLine(string.Join(" ", aa));
}
}
bluemegane