結果

問題 No.1257 変わった平均値
ユーザー abc3abc3
提出日時 2020-10-16 22:40:12
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,045 bytes
コンパイル時間 1,953 ms
コンパイル使用メモリ 205,196 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-28 04:22:49
合計ジャッジ時間 2,878 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
#include <cstdint>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const int INF=1001001001;
const int mod = 1000000007;

int main() {
  vector<int>p(3),q(3);
  cin>>p[0]>>p[1]>>p[2]>>q[0]>>q[1]>>q[2];
  //if(p[0]>q[0]||p[1]>q[1]||p[2]>q[2]){cout<<"No"<<endl;return 0;}
  //if(q[0]%2!=0||q[1]%2!=0||q[2]%2!=0){cout<<"No"<<endl;return 0;}
  //for(int i=0;i<2;i++){
  //  if(p[i]<p[i+1]){swap(p[i],p[i+1]);cout<<2<<endl;}
  //}
  queue<int>k;
  for(int i=0;i<3;i++){
    while(p[i]<q[i]){
      p[i]*=2;
      k.push(i+1);
    }
    if(p[i]!=q[i]){cout<<"No"<<endl;return 0;}
  }
  for(int i=0;i<3;i++){
    while(!k.empty()){
      int a=k.front();k.pop();
      if(k.empty()){cout<<"No"<<endl;return 0;}
      int b=k.front();k.pop();
      int c=6-a-b;
      cout<<1<<" "<<c<<endl<<1<<" "<<c<<endl;
    }
  }
  return 0;
}
0