結果
| 問題 |
No.1469 programing
|
| コンテスト | |
| ユーザー |
蜜蜂
|
| 提出日時 | 2021-04-09 21:20:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 3,000 ms |
| コード長 | 1,364 bytes |
| コンパイル時間 | 3,561 ms |
| コンパイル使用メモリ | 230,668 KB |
| 実行使用メモリ | 11,624 KB |
| 最終ジャッジ日時 | 2024-06-25 03:49:57 |
| 合計ジャッジ時間 | 4,548 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
//g++ 4.cpp -std=c++14 -O2 -I .
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vld = vector<ld>;
using vvld = vector<vld>;
#define fi first
#define se second
#define pb push_back
#define all(a) a.begin(),a.end()
#define rep(i,start,end) for(ll i=start;i<(ll)(end);i++)
#define per(i,start,end) for(ll i=start;i>=(ll)(end);i--)
ll ans=0;
int h,w,a,b;
void dfs(int x,int y,int a,int b,vvi &grid){
if(a==0&&b==0){
ans++;
return;
}
if(x>=h||y>=w){
return;
}
if(grid[x][y]!=0){
y++;
if(y==w){
x++;
y=0;
}
dfs(x,y,a,b,grid);
return;
}
if(b>0){
grid[x][y]=1;
dfs(x,y,a,b-1,grid);
grid[x][y]=0;
}
if(a>0){
if(y<w-1&&grid[x][y+1]==0){
grid[x][y]=2;
grid[x][y+1]=2;
dfs(x,y,a-1,b,grid);
grid[x][y]=0;
grid[x][y+1]=0;
}
if(x<h-1&&grid[x+1][y]==0){
grid[x][y]=3;
grid[x+1][y]=3;
dfs(x,y,a-1,b,grid);
grid[x][y]=0;
grid[x+1][y]=0;
}
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
string s;
cin>>s;
rep(i,0,s.size()){
if(i>0&&s[i-1]==s[i]){
continue;
}
cout<<s[i];
}
}
蜜蜂