結果
| 問題 | 
                            No.197 手品
                             | 
                    
| コンテスト | |
| ユーザー | 
                             No
                         | 
                    
| 提出日時 | 2015-06-07 19:41:14 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 2,427 bytes | 
| コンパイル時間 | 844 ms | 
| コンパイル使用メモリ | 112,232 KB | 
| 実行使用メモリ | 25,820 KB | 
| 最終ジャッジ日時 | 2024-06-27 09:48:20 | 
| 合計ジャッジ時間 | 3,153 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 42 WA * 1 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace foryuki
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] c1 = Console.ReadLine().ToCharArray();
            int N = int.Parse(Console.ReadLine());
            char[] c2 = Console.ReadLine().ToCharArray();
            int cnt = 0;
            foreach (var item in c1)
            {
                if (item == 'o') cnt++;
            }
            foreach (var item in c2)
            {
                if (item == 'o') cnt--;
            }
            if (cnt != 0)
            {
                Console.WriteLine("SUCCESS");
                return;
            }
            //---------------------------------------------
            if (N >= 2)
            {
                Console.WriteLine("FAILURE");
                return;
            }
            //----------------------------------------------
            string w1 = "";
            string w2 = "";
            if (N == 0)
            {
                w1 = "" + c1[0] + c1[1] + c1[2];
                w2 = "" + c1[0] + c1[1] + c1[2];
                if (w1 == w2)
                {
                    Console.WriteLine("FAILURE");
                    return;
                }
                else
                {
                    Console.WriteLine("SUCCESS");
                    return;
                }
            }
            //----------------------------------------------
            w1 = "" + c1[1] + c1[0] + c1[2];
            w2 = "" + c1[0] + c1[2] + c1[1];
            string w3 = "" + c2[0] + c2[1] + c2[2];
            if (w3 == w1 || w3 == w2)
            {
                Console.WriteLine("FAILURE");
                return;
            }
            else
            {
                Console.WriteLine("SUCCESS");
                return;
            }
        }
        //-------------------------------------------------------------
        static int[] ConvertStringArrayToIntArray(string[] str, int defaultValue)
        {
            int[] b = Array.ConvertAll<string, int>(str, delegate(string value)
                {
                    return int.Parse(value);
                });
            for (int i = 0; i < b.Length; i++)
            {
                b[i] = defaultValue;
            }
            return b;
        }
    }
}
            
            
            
        
            
No