結果
| 問題 |
No.1434 Make Maze
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2021-03-19 22:32:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,193 bytes |
| コンパイル時間 | 938 ms |
| コンパイル使用メモリ | 94,204 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-18 23:25:11 |
| 合計ジャッジ時間 | 3,887 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 2 WA * 28 |
ソースコード
//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);
if((x-(h+w-1))%4){
cout << 0 << endl;
}else{
cout << -1 << endl;
}
//一つのxに対して上下左右方向に1つのみ置ける(証明pass)
}