結果

問題 No.331 CodeRunnerでやれ
ユーザー naimonon77naimonon77
提出日時 2016-02-26 18:31:07
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 1,708 bytes
コンパイル時間 2,109 ms
コンパイル使用メモリ 144,524 KB
実行使用メモリ 24,412 KB
平均クエリ数 6422.35
最終ジャッジ日時 2023-09-23 09:00:47
合計ジャッジ時間 26,622 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
23,688 KB
testcase_01 AC 171 ms
23,436 KB
testcase_02 AC 259 ms
24,052 KB
testcase_03 AC 188 ms
24,412 KB
testcase_04 AC 394 ms
24,048 KB
testcase_05 AC 184 ms
23,448 KB
testcase_06 AC 408 ms
24,396 KB
testcase_07 AC 583 ms
24,012 KB
testcase_08 AC 292 ms
24,052 KB
testcase_09 AC 1,577 ms
24,388 KB
testcase_10 AC 333 ms
23,452 KB
testcase_11 TLE -
testcase_12 AC 1,400 ms
23,856 KB
testcase_13 AC 2,794 ms
23,616 KB
testcase_14 AC 878 ms
23,580 KB
testcase_15 AC 315 ms
7,856 KB
testcase_16 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#ifdef __unix__
#include <bits/stdc++.h>
#else
#include "bits\stdc++.h"
#endif
#include <vector>
#include <set>
#include <string>
#include <queue>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

#define SIZE 50

enum Muki{
  up,r,down,l
};

void draw_map(char map[][SIZE],int a,int x, int y,int muki) {
  int i;
  for(i=0;i<a;i++) {
    switch(muki) {
    case  up  : map[ x ][y+i] = '.'; break;
    case down : map[ x ][y-i] = '.'; break;
    case   r  : map[x+i][ y ] = '.'; break;
    case   l  : map[x-i][ y ] = '.'; break;
    }
  }
}

void print_map(char map[][SIZE]) {
  int i,j;
  for(i=0;i<SIZE;i++) {
    for(j=0;j<SIZE;j++) {
      if(map[j][i] == 0) continue;
      else printf("%c",map[j][i]);
    }
    puts("");
  }
}

int main() {
  /*
  cin.tie(0);
  ios::sync_with_stdio(false);
  */
  // char map[SIZE][SIZE] = {0};  
  // int x = 22 ,y = 22;
  int muki = down;
  int i,j,k;
  char s[20];
  // print_map(map);
  while(cin >> s) {
    if(strcmp(s,"Merry Christmas!") == 0)  break;
    int a = atoi(s);
    if(a == 20151224) cout << "F" << endl;
    else {
      // draw_map(map,a,x,y,muki);
      char c;
      if(a == 0) {       
        switch(rand() % 2) {
        case 0 : c = 'L'; break;
        case 1 : c = 'R'; break;
        }
      }
      else {
        if(rand() % 10 > 2) c = 'F';
        else {
          switch(rand() % 2) {
          case 0 : c = 'L'; break;
          case 1 : c = 'R'; break;
          }
        }
      }
      cout << c << endl;
      // print_map(map);
    }
  }

  return 0;
}
0