結果

問題 No.3209 Cherry Calculation
ユーザー jiyujin816
提出日時 2025-07-25 21:21:43
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 2,580 bytes
コンパイル時間 6,330 ms
コンパイル使用メモリ 335,104 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-07-25 21:22:13
合計ジャッジ時間 7,447 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#include <atcoder/all>

/*多倍長整数
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
// 任意長整数型
using Bint = mp::cpp_int;
 //仮数部が10進数で1024桁の浮動小数点数型(TLEしたら小さくする)
using Real = mp::number<mp::cpp_dec_float<1024>>;
*/
using namespace std;
using namespace atcoder;
using ll=long long;
using ull=unsigned long long;
using ld=long double;
using mint=modint998244353;
using mint2=modint1000000007;
//任意modint
using mint3=static_modint<1000000000>;
using P=pair<ll,ll>;
const ll INF=1e17; 
const vector<ll> dx={0,0,1,-1,1,1,-1,-1};
const vector<ll> dy={1,-1,0,0,1,-1,-1,1};
const vector<char> dirs={'>','<','v','^'};
#define rep(i,N) for(ll i=0;i<N;i++)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
template <typename T1,typename T2>
ostream& operator<<(ostream &os,pair<T1,T2> &pai){
    return os<<"("<<pai.first<<","<<pai.second<<") ";
}
template<typename T>
ostream& operator<<(ostream &os,vector<T> vec){
    for(auto val:vec){
        os<<val<<" ";
    }
    return os<<"\n";
}
template<typename T>
istream& operator>>(istream &is,vector<T> &vec){
    for(int i=0;i<(int)vec.size();i++){
        is>>vec[i];
    }
    return is;
}
template<typename T,typename T2>
istream& operator>>(istream &is,pair<T,T2> &pai){
    is>>pai.first>>pai.second;
    return is;
}
void set_cout(){
    cout<<fixed<<setprecision(15);
}
template <typename T> void print(const T &vec){
    int i=0;
    for(auto val:vec){
        cout<<i<<":"<<val<<",";
        i++;
    }
    cout<<'\n';
}
template<typename T> void print2(const vector<vector<T>> &vec){
    int i=0;
    for(auto v:vec){
        cout<<i<<": ";
        for(auto a:v){
            cout<<a<<" ";
        }
        i++;
        cout<<'\n';
    }
}
template<class T> void chmin(T &a,T b){
    if(a>b){
        a=b;
    }
    return;
}
template<class T> void chmax(T &a,T b){
    if(a<b){
        a=b;
    }
    return;
}

struct ob3{
    ll a,b,c;
    bool operator<(const ob3 &o) const{
        return a<o.a;
    }
    bool operator>(const ob3 &o) const{
        return a>o.a;
    }
};
struct ob4{
    ll a,b,c,d;
    friend auto operator<=>(const ob4&,const ob4&)=default;
};
int main(){
    cin.tie(0)->sync_with_stdio(0);
    int A,B;
    cin>>A>>B;
    for(int x=1;x<=10;x++){
        for(int y=1;y<=10;y++){
            if(A+x==10 && x+y==B){
                cout<<x<<" "<<y;
                return 0;
            }
        }
    }
}
0