結果
問題 | No.1329 Square Sqsq |
ユーザー |
![]() |
提出日時 | 2021-01-08 21:25:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 4,548 bytes |
コンパイル時間 | 1,612 ms |
コンパイル使用メモリ | 128,256 KB |
最終ジャッジ日時 | 2025-01-17 11:13:00 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
コンパイルメッセージ
main.cpp: In function ‘void readline(T&)’: main.cpp:30:82: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 30 | template <typename T> inline void readline(T &n) {n = 0; int f = 1; register int ch = getchar(); | ^~ main.cpp: In function ‘void readlinel(T&)’: main.cpp:35:95: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister] 35 | template <typename T> inline void readlinel(T &n) {n = 0; long long f = 1; register long long ch = getchar(); | ^~ main.cpp: In function ‘void print(long long int)’: main.cpp:61:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 61 | void print(ll n){printf("%I64d\n", n);} | ~~~~^ ~ | | | | int long long int | %I64lld main.cpp: In function ‘void Print(long long int)’: main.cpp:62:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 62 | void Print(ll n){printf("%I64d ", n);} | ~~~~^ ~ | | | | int long long int | %I64lld main.cpp: In function ‘void print(long long int, long long int)’: main.cpp:67:35: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] 67 | void print(ll n,ll m){printf("%I64d ",n);printf("%I64d ",m);} | ~~~~^ ~ | | | | int long long int |
ソースコード
//Author: Fuadul Hasan(fuadul202@gmail.com)//BSMRSTU,Gopalganj//#include<bits/stdc++.h>#define _USE_MATH_DEFINES#include <set>#include <map>#include <list>#include <queue>#include <stack>#include <cmath>#include <ctime>#include <cstdio>#include <string>#include <vector>#include <bitset>#include <random>#include <cassert>#include <cstring>#include <sstream>#include <complex>#include <numeric>#include <iostream>#include <algorithm>#include <functional>#include <unordered_set>#include <unordered_map>using namespace std;//int input........template <typename T> inline void readline(T &n) {n = 0; int f = 1; register int ch = getchar();for (; !isdigit(ch); ch = getchar()) if (ch == '-') f = -1;for (; isdigit(ch); ch = getchar()) n = (n << 3) + (n << 1) + ch - '0';n = n * f;}template <typename T, typename TT> inline void readline(T &n, TT &m) { readline(n); readline(m); }template <typename T, typename TT, typename TTT> inline void readline(T &n, TT &m, TTT &l) { readline(n, m); readline(l);}// long long input........template <typename T> inline void readlinel(T &n) {n = 0; long long f = 1; register long long ch = getchar();for (; !isdigit(ch); ch = getchar()) if (ch == '-') f = -1;for (; isdigit(ch); ch = getchar()) n = (n << 3) + (n << 1) + ch - '0';n = n * f;}template <typename T, typename TT> inline void readlinel(T &n, TT &m) { readlinel(n); readlinel(m); }template <typename T, typename TT, typename TTT> inline void readlinel(T &n, TT &m, TTT &l) { readlinel(n, m); readlinel(l);}//debug..........#define error(args...) {vector<string>_v=split(#args,',');err(_v.begin(),args);cout<<endl;}vector<string> split(const string &s, char c) {vector<string>v; stringstream ss(s); string x;while (getline(ss, x, c))v.emplace_back(x); return move(v);} void err(vector<string>::iterator it) {}template<typename T, typename... Args>void err(vector<string>::iterator it, T a, Args...args) {cout << it->substr((*it)[0] == ' ', it->length()) << "= " << a << " "; err(++it, args...);}//............ignore it..................//#define F first#define S second#define Pi atan(1)*4#define mp make_pair#define pb push_backconst int M = 1e9 + 7;#define ll long long int#define happy cin.tie(0);#define point(x) setprecision(x)void Print(int n){printf("%d ", n);}void print(int n){printf("%d\n", n);}#define Test printf("Case %d: ",tc++);int length(string s){return s.size();}void print(ll n){printf("%I64d\n", n);}void Print(ll n){printf("%I64d ", n);}#define coding ios::sync_with_stdio(false);#define Unique(c) (c).resize(unique(all(c))-(c).begin())void print(int n,int m){printf("%d ",n);printf("%d ",m);}void print(ll n,ll m){printf("%I64d ",n);printf("%I64d ",m);}#define vout(v) for (auto z: v) cout << z << " "; cout << endl;int length(long long x){int l = 0;for(long long i=x;i;i/=10)l++;return l;}int dx[8]= {1,0,-1,0,-1,-1,1,1};int dy[8]= {0,1,0,-1,-1,1,-1,1}; int tc = 1;void print(int n,int m,int k){printf("%d ",n);printf("%d ",m);printf("%d ",k);}void print(ll n,ll m,ll k){printf("%I64d ",n);printf("%I64d ",m);printf("%I64d ",k);}long long power(long long a,long long n){ll res = 1;while(n){if(n&1) res = ((res%M)*(a%M))%M;a = ((a%M)*(a%M))%M;n>>=1;}return res%M;}inline void read(std::vector<int> &v){for(int i=0;i<(int)v.size();i++){readline(v[i]);}}inline void read(std::vector<ll> &v){for(int i=0;i<(int)v.size();i++){readlinel(v[i]);}}template<class T> bool remin(T& a, const T& b) { return a > b ? a = b, 1 : 0; }template<class T> bool remax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }inline void read(int v[],int n){for(int i=0;i<n;i++){readline(v[i]);}}inline void read(ll v[],int n){for(int i=0;i<n;i++){readlinel(v[i]);}}inline int add(int a, int b, int mod) {a += b ; return a >= mod ? a - mod : a ;}inline int sub(int a, int b, int mod) {a -= b ; return a < 0 ? a + mod : a ;}inline int mul(int a, int b, int mod) {return (ll)a * b % mod ;}#define pr pair<int, int>#define vpr vector<pr>#define vi std::vector<int>#define vll std::vector<ll>#define all(n) n.begin(),n.end()const int Inf = (int)2e9 + 5;const ll Lnf = (ll)2e18 + 5;const int N = 5e5 + 5;const int NN = 1e6 + 5;int solve(){//happy codingstring s;cin>>s;int x = s.size();cout<<(x+1)/2<<endl;return 0;//error();}int main(){int test = 1;//readline(test);//(void)getchar();while (test--)solve();return 0;}