結果
| 問題 |
No.1366 交換門松列・梅
|
| コンテスト | |
| ユーザー |
sorag
|
| 提出日時 | 2022-08-17 16:14:27 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,064 bytes |
| コンパイル時間 | 1,174 ms |
| コンパイル使用メモリ | 101,336 KB |
| 最終ジャッジ日時 | 2024-11-15 02:29:24 |
| 合計ジャッジ時間 | 1,765 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:33:13: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
33 | sort(all(c));
| ^~~~
| sqrt
ソースコード
#include <iostream>
#include<utility>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define pb push_back
#define all(x) begin(x),end(x)
#define ll long long
#define P pair<int,int>
#define lP pait<ll,ll>
using namespace std;
int main() {
bool h=0;
vector<int> a(3),b(3);
for(int i=0;i<3;i++)
{
cin>>a[i];
}
for(int i=0;i<3;i++)
{
cin>>b[i];
}
for(int i=0;i<3;i++){
for(int j=0;j<3;j++){
bool f=0,g=0;
swap(a[i],b[j]);
int c[]={a[0],a[1],a[2]};
int d[]={b[0],b[1],b[2]};
sort(all(c));
sort(all(d));
if(c[0]!=c[1] and c[1]!=c[2] and c[2]!=c[0]){
if(c[0]==a[1] or c[2]==a[1]) f=1;
}
if(d[0]!=d[1] and d[1]!=d[2] and d[2]!=d[0]){
if(d[0]==b[1] or d[2]==b[1]) g=1;
}
if(f and g) h=1;
swap(a[i],b[j]);
}
}
if(h) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
sorag