結果

問題 No.1329 Square Sqsq
ユーザー GraphiumGraphium
提出日時 2021-01-08 22:02:21
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 5,529 bytes
コンパイル時間 3,322 ms
コンパイル使用メモリ 233,252 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-16 11:47:32
合計ジャッジ時間 4,318 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

//#include<atcoder/all>//atcoder
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
//using namespace atcoder;//atcoder
using ll = long long;
//using mint = modint1000000007;//atcoder
using vi = vector<ll>;
using vi2 = vector<vector<ll>>;
using vb = vector<bool>;
using vb2 = vector<vector<bool>>;
using vc = vector<char>;
using vc2 = vector<vector<char>>;
using si = set<ll>;
using pii = pair<ll, ll>;
using mii = map<ll, ll>;
const int INF = 1e9+1;
const ll LINF = 1e18+1;
const long double LPI = acos(-1.0);
const  double PI = acos(-1.0);
const ll mod = 1e9+7;

#define MP(a,b) make_pair((a),(b))
#define MT(...) make_tuple(__VA_ARGS__)
#define sz(x) (int)(x).size()

#define fi first
#define se second
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define REP(i,x) for(ll i=0;i<(int)(x);i++)
#define REPS(i,x) for(ll i=1;i<=(int)(x);i++)
#define RREP(i,x) for(ll i=((int)(x)-1);i>=0;i--)
#define RREPS(i,x) for(ll i=((int)(x));i>0;i--)

#define endl "\n"
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define SORT(v) sort(ALL(v));
#define RSORT(v) sort(RALL(v));
#define IN(type,a) type a;cin >> a;
#define VIN(type,a,n) vector<type> a(n);cin >> a;
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl;
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl;
#define COUT(x) cout << (x) << endl;
#define CERR(x) cerr << (x) << endl;
#define DCOUT(x,n) cout << fixed << setprecision(n) << (x) << endl;
#define ENDL cout << endl;
#define SP cout << " ";
#define Debug(x) cout << #x << " : " << x << endl;
#define PB(x) emplace_back(x)

#define HOGE COUT("HOGE")
#define AJA COUT("AJA")

template<typename T>inline istream& operator>>(istream&i,vector<T>&v)
{REP(j,sz(v))i>>v[j];return i;}

template<typename T>inline bool chmax(T& a, const T& b){if(a<b){a=b;return true;}return false;}
template<typename T>inline bool chmin(T& a, const T& b){if(a>b){a=b;return true;}return false;}
template<typename T>inline T gcd(T a,T b){if(b==0){return a;}else{return gcd(b, a%b);}}
template<typename T>inline T lcm(T a,T b){return a*b/gcd(a, b);}
template<typename T>inline bool isPrime(T a){if(a<=1){return false;}
    for(T i=2;i*i<=a;i++){if (a%i==0) {return false;}}return true;}
template<typename T>inline T ord(T p,T n){T ans=0;while(true){if(n%p==0){n/=p;ans++;}else{break;}}return ans;}

inline char janken(char a,char b){if(a==b){return a;}if(a=='R'){if(b=='P'){return b;}if(b=='S'){return a;}}
    if(a=='P'){if(b=='R'){return a;}if(b=='S'){return b;}}if(a=='S'){if(b=='P'){return a;}if (b=='R'){return b;}}return 'k';}

struct UnionFind {
    vector<ll> parent;//
    vector<ll> siz;
    map<ll,vector<ll>> group;
    UnionFind(ll n) : parent(n),siz(n){
        REP(i, n){
            parent[i]=i;
            siz[i] = 1;
        }
    }
    inline ll root(ll k){
        if (parent[k]==k) return k;
        return parent[k]=root(parent[k]);
    }
    inline void unite(ll a,ll b){
        ll ra = root(a);
        ll rb = root(b);
        if (ra==rb) return;
        if (ra>rb) swap(ra, rb);
        parent[rb] = ra;
        siz[ra] += siz[rb];
    }
    inline bool same(ll a,ll b){
        return root(a)==root(b);
    }
    inline ll size(ll a){
        return siz[root(a)];
    }
    inline vector<vector<ll>> grouping(){
        ll n = parent.size();
        REP(i,n)group[root(i)].emplace_back(i);
        vector<vector<ll>> res;
        for (auto i : group) {
            res.emplace_back(i.second);
        }
        return res;
    }
};

struct WGraph {//重みつきグラフ
    struct GEdge{
        ll to;
        ll wei;
    };
    GEdge make_GEdge(ll a, ll weight){
        GEdge e;
        e.to = a;
        e.wei = weight;
        return e;
    }
    vector<vector<GEdge>> g;
    WGraph(ll n) : g(n){};
    inline void dlink(ll a, ll b, ll weight){
        g[a].push_back(make_GEdge(b,weight));
    }
    inline void link(ll a, ll b, ll weight){
        g[a].push_back(make_GEdge(b,weight));
        g[b].push_back(make_GEdge(a,weight));
    }
    inline vector<GEdge> eges(ll a){
        return g[a];
    }
    inline ll size(){
        return g.size();
    }
    inline ll size(ll a){
        return g[a].size();
    }
};

inline vi Dijkstra(ll start,WGraph &g) {
    vi ans(g.size(),LINF);
    ans[start] = 0;
    priority_queue<pii,vector<pii>,greater<pii>> que;
    que.push(MP(0,start));
    while (!que.empty()) {
        ll dis = que.top().first;
        ll now = que.top().second;
        que.pop();
        if (dis>ans[now])continue;
        for (auto i : g.eges(now)) {
            if (ans[i.to]>dis+i.wei) {
                ans[i.to] = dis+i.wei;
                que.push(MP(ans[i.to],i.to));
            }
        }
    }
    return ans;
}

struct Edge{
    ll u,v,wei;
    bool operator<(const Edge &e) const {return this->wei<e.wei;}
    friend istream &operator>>(istream& i ,Edge& e){i >> e.u >> e.v >> e.wei;return i;}
};
inline Edge make_Edge(ll u, ll v, ll wei){
    Edge res;
    res.u = u;
    res.v = v;
    res.wei = wei;
    return res;
}

inline ll Kruskal(vector<Edge> &g,ll n){
    ll res = 0;
    SORT(g);
    UnionFind d(n);
    for (auto i : g) {
        if(d.same(i.u, i.v)) continue;
        res += i.wei;
        d.unite(i.u, i.v);
    }
    return res;
}

inline void solve(){
    IN(double, n);
    n = sqrt(n);
    ll k = n;
    string s = to_string(k);
    COUT(s.size())
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    solve();
}
0