結果

問題 No.1434 Make Maze
ユーザー CleyLCleyL
提出日時 2021-03-19 22:35:49
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 2,271 bytes
コンパイル時間 1,638 ms
コンパイル使用メモリ 93,892 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-29 17:46:49
合計ジャッジ時間 4,392 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
5,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

//author:luckYrat(twitter:@luckYrat_)
//競技プログラミングから逃げるな
//https://www.youtube.com/watch?v=z_B9iJ8r4ic

//せんげん!
#include <iostream>

#include <cmath>
#include <algorithm>
#include <iomanip>

#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <bitset>

#include <cctype>
#include <utility>
#include <climits>


//なまえくーかん!
using namespace std;
using ll = long long;
using P = pair<ll,ll>;

//てーすう!
const int mod = 1000000007;
const int inf = (1<<30)-1;
const ll linf = (1LL<<62LL)-1;
const double EPS = (1e-10);

//でふぁいん!
#define anyfill(n,s) setw(n) << setfill(s)
#define loop(s) for(int i = 0; s > i; i++)
#define rep(i,q) for(int i = 0; (q) > i; i++)
#define repp(i,n,q) for(int i = n; (q) > i; i++)
#define dep(i,q) for(int i = (q); 0 < i; i--)

//みじかく!
#define pb push_back
#define fir first
#define scn second
#define ednl endl

//いぇすのー!
#define YesNo(a) (a?"Yes":"No")
#define YESNO(a) (a?"YES":"NO")
#define yesno(a) (a?"yes":"no")

//きんぼーnほーこー!!
P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}};
P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
/*
確認ポイント
cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる

計算量は変わらないが楽できるシリーズ
min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる
count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる
*/


__attribute__((constructor))
void initial() {
 cin.tie(0);
 ios::sync_with_stdio(false);
}
int main(){
  int h,w,x;cin>>h>>w>>x;
  char a[h][w];
  for(int i = 0; h > i; i++){
    for(int j = 0; w > j; j++){
      int I = i+1,J = j+1;
      if((I%2) && (J%2)){
        a[i][j] = '.';
      }else if((!(I%2)) && (!(J%2))){
        a[i][j] = '#';
      }else{
        a[i][j] = '?';
      }
    }
  }
  //必要数
  int wan = ((h-1)/2)*((w-1)/2);
  //最大値 
  int nun = h*(w/2+1)+w/2;
  if((x-(h+w-1))%4 || 0>(x-(h+w-1)) || (x-(h+w-1))>nun){
    cout << 0 << endl;
  }else{
    cout << -1 << endl;
  }
  //一つのxに対して上下左右方向に1つのみ置ける(証明pass)


}
0