結果

問題 No.3083 12歳
ユーザー tada721tada721
提出日時 2021-04-01 20:46:54
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 6,040 bytes
コンパイル時間 1,191 ms
コンパイル使用メモリ 96,160 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-23 04:25:08
合計ジャッジ時間 15,061 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 WA -
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 WA -
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 2 ms
4,376 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 AC 2 ms
4,380 KB
testcase_33 AC 1 ms
4,376 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 2 ms
4,376 KB
testcase_38 AC 2 ms
4,376 KB
testcase_39 AC 1 ms
4,376 KB
testcase_40 AC 2 ms
4,380 KB
testcase_41 AC 1 ms
4,376 KB
testcase_42 AC 1 ms
4,380 KB
testcase_43 AC 2 ms
4,376 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 2 ms
4,376 KB
testcase_47 AC 1 ms
4,380 KB
testcase_48 AC 2 ms
4,380 KB
testcase_49 AC 2 ms
4,376 KB
testcase_50 AC 1 ms
4,380 KB
testcase_51 AC 1 ms
4,380 KB
testcase_52 AC 1 ms
4,376 KB
testcase_53 AC 1 ms
4,376 KB
testcase_54 WA -
testcase_55 AC 1 ms
4,384 KB
testcase_56 AC 2 ms
4,376 KB
testcase_57 AC 2 ms
4,376 KB
testcase_58 AC 2 ms
4,376 KB
testcase_59 AC 2 ms
4,376 KB
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 AC 1 ms
4,376 KB
testcase_64 AC 1 ms
4,380 KB
testcase_65 AC 2 ms
4,380 KB
testcase_66 WA -
testcase_67 AC 1 ms
4,380 KB
testcase_68 AC 1 ms
4,376 KB
testcase_69 WA -
testcase_70 WA -
testcase_71 AC 1 ms
4,380 KB
testcase_72 AC 2 ms
4,376 KB
testcase_73 WA -
testcase_74 AC 2 ms
4,376 KB
testcase_75 AC 2 ms
4,380 KB
testcase_76 WA -
testcase_77 AC 1 ms
4,376 KB
testcase_78 AC 2 ms
4,380 KB
testcase_79 AC 2 ms
4,376 KB
testcase_80 AC 1 ms
4,376 KB
testcase_81 WA -
testcase_82 WA -
testcase_83 WA -
testcase_84 WA -
testcase_85 AC 1 ms
4,376 KB
testcase_86 AC 1 ms
4,380 KB
testcase_87 AC 1 ms
4,384 KB
testcase_88 AC 2 ms
4,380 KB
testcase_89 AC 1 ms
4,376 KB
testcase_90 AC 2 ms
4,376 KB
testcase_91 WA -
testcase_92 WA -
testcase_93 WA -
testcase_94 AC 1 ms
4,380 KB
testcase_95 AC 2 ms
4,376 KB
testcase_96 AC 1 ms
4,376 KB
testcase_97 AC 1 ms
4,376 KB
testcase_98 WA -
testcase_99 WA -
testcase_100 WA -
testcase_101 WA -
testcase_102 WA -
testcase_103 AC 1 ms
4,380 KB
testcase_104 WA -
testcase_105 WA -
testcase_106 WA -
testcase_107 WA -
testcase_108 WA -
testcase_109 WA -
testcase_110 WA -
testcase_111 WA -
testcase_112 WA -
testcase_113 WA -
testcase_114 WA -
testcase_115 WA -
testcase_116 AC 2 ms
4,380 KB
testcase_117 WA -
testcase_118 AC 1 ms
4,380 KB
testcase_119 AC 1 ms
4,380 KB
testcase_120 AC 2 ms
4,376 KB
testcase_121 AC 2 ms
4,384 KB
testcase_122 WA -
testcase_123 AC 1 ms
4,376 KB
testcase_124 AC 1 ms
4,376 KB
testcase_125 AC 2 ms
4,380 KB
testcase_126 WA -
testcase_127 WA -
testcase_128 AC 1 ms
4,376 KB
testcase_129 AC 2 ms
4,376 KB
testcase_130 WA -
testcase_131 AC 2 ms
4,376 KB
testcase_132 WA -
testcase_133 WA -
testcase_134 WA -
testcase_135 WA -
testcase_136 WA -
testcase_137 WA -
testcase_138 WA -
testcase_139 WA -
testcase_140 WA -
testcase_141 WA -
testcase_142 AC 1 ms
4,380 KB
testcase_143 AC 2 ms
4,380 KB
testcase_144 AC 1 ms
4,380 KB
testcase_145 WA -
testcase_146 WA -
testcase_147 WA -
testcase_148 WA -
testcase_149 WA -
testcase_150 WA -
testcase_151 AC 2 ms
4,376 KB
testcase_152 AC 2 ms
4,380 KB
testcase_153 WA -
testcase_154 WA -
testcase_155 AC 1 ms
4,380 KB
testcase_156 AC 1 ms
4,376 KB
testcase_157 AC 2 ms
4,376 KB
testcase_158 AC 1 ms
4,380 KB
testcase_159 WA -
testcase_160 AC 1 ms
4,376 KB
testcase_161 AC 1 ms
4,380 KB
testcase_162 AC 2 ms
4,376 KB
testcase_163 AC 2 ms
4,376 KB
testcase_164 AC 1 ms
4,376 KB
testcase_165 AC 1 ms
4,380 KB
testcase_166 AC 1 ms
4,376 KB
testcase_167 AC 1 ms
4,376 KB
testcase_168 AC 1 ms
4,380 KB
testcase_169 AC 1 ms
4,376 KB
testcase_170 AC 1 ms
4,376 KB
testcase_171 AC 2 ms
4,376 KB
testcase_172 AC 2 ms
4,376 KB
testcase_173 AC 1 ms
4,376 KB
testcase_174 WA -
testcase_175 AC 2 ms
4,380 KB
testcase_176 AC 2 ms
4,376 KB
testcase_177 AC 2 ms
4,376 KB
testcase_178 AC 2 ms
4,376 KB
testcase_179 AC 1 ms
4,376 KB
testcase_180 AC 2 ms
4,380 KB
testcase_181 AC 2 ms
4,376 KB
testcase_182 AC 1 ms
4,380 KB
testcase_183 WA -
testcase_184 WA -
testcase_185 AC 2 ms
4,380 KB
testcase_186 AC 1 ms
4,376 KB
testcase_187 WA -
testcase_188 AC 2 ms
4,380 KB
testcase_189 AC 1 ms
4,380 KB
testcase_190 WA -
testcase_191 AC 2 ms
4,376 KB
testcase_192 AC 1 ms
4,380 KB
testcase_193 AC 2 ms
4,376 KB
testcase_194 AC 1 ms
4,376 KB
testcase_195 WA -
testcase_196 WA -
testcase_197 WA -
testcase_198 WA -
testcase_199 AC 1 ms
4,380 KB
testcase_200 AC 2 ms
4,376 KB
testcase_201 AC 2 ms
4,380 KB
testcase_202 AC 1 ms
4,380 KB
testcase_203 AC 2 ms
4,380 KB
testcase_204 AC 1 ms
4,376 KB
testcase_205 WA -
testcase_206 WA -
testcase_207 WA -
testcase_208 AC 2 ms
4,380 KB
testcase_209 AC 2 ms
4,376 KB
testcase_210 AC 2 ms
4,380 KB
testcase_211 AC 2 ms
4,380 KB
testcase_212 AC 2 ms
4,380 KB
testcase_213 AC 2 ms
4,376 KB
testcase_214 AC 1 ms
4,376 KB
testcase_215 WA -
testcase_216 WA -
testcase_217 AC 2 ms
4,376 KB
testcase_218 AC 2 ms
4,380 KB
testcase_219 AC 2 ms
4,376 KB
testcase_220 AC 1 ms
4,376 KB
testcase_221 AC 2 ms
4,376 KB
testcase_222 AC 2 ms
4,376 KB
testcase_223 AC 2 ms
4,376 KB
testcase_224 AC 2 ms
4,380 KB
testcase_225 WA -
testcase_226 AC 1 ms
4,376 KB
testcase_227 AC 2 ms
4,380 KB
testcase_228 AC 1 ms
4,376 KB
testcase_229 AC 1 ms
4,376 KB
testcase_230 AC 1 ms
4,376 KB
testcase_231 WA -
testcase_232 WA -
testcase_233 WA -
testcase_234 AC 1 ms
4,376 KB
testcase_235 AC 1 ms
4,376 KB
testcase_236 AC 2 ms
4,380 KB
testcase_237 WA -
testcase_238 AC 2 ms
4,380 KB
testcase_239 AC 2 ms
4,376 KB
testcase_240 WA -
testcase_241 WA -
testcase_242 AC 2 ms
4,376 KB
testcase_243 AC 1 ms
4,380 KB
testcase_244 WA -
testcase_245 AC 2 ms
4,376 KB
testcase_246 AC 2 ms
4,376 KB
testcase_247 WA -
testcase_248 AC 2 ms
4,380 KB
testcase_249 AC 1 ms
4,380 KB
testcase_250 AC 2 ms
4,376 KB
testcase_251 AC 1 ms
4,376 KB
testcase_252 WA -
testcase_253 WA -
testcase_254 WA -
testcase_255 WA -
testcase_256 AC 2 ms
4,376 KB
testcase_257 AC 1 ms
4,376 KB
testcase_258 AC 1 ms
4,380 KB
testcase_259 AC 2 ms
4,376 KB
testcase_260 AC 1 ms
4,380 KB
testcase_261 AC 1 ms
4,380 KB
testcase_262 WA -
testcase_263 WA -
testcase_264 WA -
testcase_265 AC 2 ms
4,380 KB
testcase_266 AC 2 ms
4,380 KB
testcase_267 AC 2 ms
4,376 KB
testcase_268 AC 1 ms
4,376 KB
testcase_269 WA -
testcase_270 WA -
testcase_271 WA -
testcase_272 WA -
testcase_273 WA -
testcase_274 AC 1 ms
4,376 KB
testcase_275 WA -
testcase_276 WA -
testcase_277 WA -
testcase_278 WA -
testcase_279 WA -
testcase_280 WA -
testcase_281 WA -
testcase_282 WA -
testcase_283 WA -
testcase_284 WA -
testcase_285 WA -
testcase_286 WA -
testcase_287 AC 2 ms
4,376 KB
testcase_288 WA -
testcase_289 AC 2 ms
4,376 KB
testcase_290 AC 1 ms
4,380 KB
testcase_291 AC 2 ms
4,376 KB
testcase_292 AC 1 ms
4,376 KB
testcase_293 WA -
testcase_294 AC 1 ms
4,380 KB
testcase_295 AC 2 ms
4,376 KB
testcase_296 AC 2 ms
4,380 KB
testcase_297 WA -
testcase_298 WA -
testcase_299 AC 1 ms
4,380 KB
testcase_300 AC 1 ms
4,380 KB
testcase_301 WA -
testcase_302 AC 1 ms
4,380 KB
testcase_303 WA -
testcase_304 WA -
testcase_305 WA -
testcase_306 WA -
testcase_307 WA -
testcase_308 WA -
testcase_309 WA -
testcase_310 WA -
testcase_311 WA -
testcase_312 WA -
testcase_313 AC 1 ms
4,376 KB
testcase_314 AC 1 ms
4,380 KB
testcase_315 AC 2 ms
4,380 KB
testcase_316 WA -
testcase_317 WA -
testcase_318 WA -
testcase_319 WA -
testcase_320 WA -
testcase_321 WA -
testcase_322 AC 2 ms
4,376 KB
testcase_323 AC 1 ms
4,380 KB
testcase_324 WA -
testcase_325 WA -
testcase_326 AC 2 ms
4,376 KB
testcase_327 AC 2 ms
4,380 KB
testcase_328 AC 1 ms
4,376 KB
testcase_329 AC 2 ms
4,376 KB
testcase_330 WA -
testcase_331 AC 2 ms
4,376 KB
testcase_332 AC 1 ms
4,380 KB
testcase_333 AC 2 ms
4,380 KB
testcase_334 AC 2 ms
4,376 KB
testcase_335 AC 1 ms
4,376 KB
testcase_336 AC 2 ms
4,376 KB
testcase_337 AC 1 ms
4,376 KB
testcase_338 AC 1 ms
4,380 KB
testcase_339 AC 2 ms
4,376 KB
testcase_340 AC 1 ms
4,376 KB
testcase_341 AC 1 ms
4,380 KB
testcase_342 AC 2 ms
4,376 KB
testcase_343 AC 1 ms
4,376 KB
testcase_344 WA -
testcase_345 AC 2 ms
4,376 KB
testcase_346 WA -
testcase_347 AC 2 ms
4,380 KB
testcase_348 AC 2 ms
4,376 KB
testcase_349 AC 2 ms
4,376 KB
testcase_350 AC 2 ms
4,380 KB
testcase_351 WA -
testcase_352 AC 1 ms
4,376 KB
testcase_353 AC 1 ms
4,376 KB
testcase_354 WA -
testcase_355 AC 1 ms
4,376 KB
testcase_356 AC 1 ms
4,376 KB
testcase_357 AC 1 ms
4,376 KB
testcase_358 WA -
testcase_359 AC 1 ms
4,376 KB
testcase_360 AC 1 ms
4,376 KB
testcase_361 WA -
testcase_362 AC 1 ms
4,376 KB
testcase_363 AC 1 ms
4,380 KB
testcase_364 AC 2 ms
4,376 KB
testcase_365 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: 関数 ‘long long int keta(long long int)’ 内:
main.cpp:41:1: 警告: 制御が非 void 関数の終りに到達しました [-Wreturn-type]
   41 | }
      | ^
main.cpp: 関数 ‘long long int gcd(long long int, long long int)’ 内:
main.cpp:55:1: 警告: 制御が非 void 関数の終りに到達しました [-Wreturn-type]
   55 | }
      | ^
main.cpp: 関数 ‘long long int lcm(long long int, long long int)’ 内:
main.cpp:68:1: 警告: 制御が非 void 関数の終りに到達しました [-Wreturn-type]
   68 | }
      | ^

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<cmath>
#include<map>
#include<stdio.h>
#include<vector>
#include<queue>
#include<math.h>
#include<deque>
#include<set>
#include<tuple>
#include<string>
using namespace std;
#define ll long long
#define int long long
#define rep(s,i,n) for(int i=s;i<n;i++)
#define c(n) cout<<n<<endl;
#define ic(n) int n;cin>>n;
#define sc(s) string s;cin>>s;
#define mod 998244353
#define inf 2000000000000000007
#define f first
#define s second
#define mini(c,a,b) *min_element(c+a,c+b)
#define maxi(c,a,b) *max_element(c+a,c+b)
#define pi 3.141592653589793238462643383279
#define e_ 2.718281828459045235360287471352
#define P pair<int,int>
#define upp(a,n,x) upper_bound(a,a+n,x)-a;
#define low(a,n,x) lower_bound(a,a+n,x)-a;
#define UF UnionFind 
#define pb push_back
//printf("%.12Lf\n",);
int keta(int x) {
	rep(0, i, 30) {
		if (x < 10) {
			return i + 1;
		}
		x = x / 10;
	}
}
int gcd(int x, int y) {
	if (x == 0 || y == 0)return x + y;
	int aa = x, bb = y;
	rep(0, i, 1000) {
		aa = aa % bb;
		if (aa == 0) {
			return bb;
		}
		bb = bb % aa;
		if (bb == 0) {
			return aa;
		}
	}
}
int lcm(int x, int y) {
	int aa = x, bb = y;
	rep(0, i, 1000) {
		aa = aa % bb;
		if (aa == 0) {
			return x / bb * y;
		}
		bb = bb % aa;
		if (bb == 0) {
			return x / aa * y;
		}
	}
}
bool prime(int x) {
	if (x == 1)return false;
	rep(2, i, sqrt(x) + 1) {
		if (x % i == 0 && x != i) {
			return false;
		}
	}
	return true;
}
int max(int a, int b) {
	if (a >= b)return a;
	else return b;
}
string maxst(string s, string t) {
	int n = s.size();
	int m = t.size();
	if (n > m)return s;
	else if (n < m)return t;
	else {
		rep(0, i, n) {
			if (s[i] > t[i])return s;
			if (s[i] < t[i])return t;
		}
		return s;
	}
}
int min(int a, int b) {
	if (a >= b)return b;
	else return a;
}
int yakuwa(int n) {
	int sum = 0;
	rep(1, i, sqrt(n + 1)) {
		if (n % i == 0)sum += i + n / i;
		if (i * i == n)sum -= i;
	}
	return sum;
}
int poow(int n,int m){
	int pro=1;
	int nn=n;
	while(m){
		if(m%2==1)pro=pro*nn%mod;
		m=m/2;
		nn=nn*nn%mod;
	}
	return pro;
}
int poow2(int n,int m,int modulo){
	int pro=1;
	int nn=n;
	while(m){
		if(m%2==1)pro=pro*nn%modulo;
		m=m/2;
		nn=nn*nn%modulo;
	}
	return pro;
}
int inv(int n,int m){
	int t=poow(m,mod-2)%mod;
	return n*t%mod;
}
int com(int n,int m){
	if(n<m)return 0;
	int bunsi=1,bunbo=1;	
	for(int i=n-m+1;i<=n;i++)bunsi=bunsi*i%mod;
	for(int i=1;i<=m;i++)bunbo=bunbo*i%mod;
	return inv(bunsi,bunbo);
}
int minpow(int x, int y) {
	int sum = 1;
	rep(0, i, y)sum *= x;
	return sum;
}
int ketawa(int x, int sinsuu) {
	int sum = 0;
	rep(0, i, 100)sum += (x % poow(sinsuu, i + 1)) / (poow(sinsuu, i));
	return sum;
}
int sankaku(int a) {
	return a * (a + 1) / 2;
}
int sames(int a[1111111], int n) {
	int ans = 0;
	rep(0, i, n) {
		if (a[i] == a[i + 1]) {
			int j = i;
			while (a[j + 1] == a[i] && j <= n - 2)j++;
			ans += sankaku(j - i);
			i = j;
		}
	}
	return ans;
}
using Graph = vector<vector<int>>;
int oya[214514];
int depth[214514];
int subtreesize[214514];
void dfs(const Graph& G, int v, int p, int d) {
	depth[v] = d;
	oya[v] = p;
	for (auto nv : G[v]) {
		if (nv == p) continue; // nv が親 p だったらダメ
		dfs(G, nv, v, d + 1); // d を 1 増やして子ノードへ
	}
	subtreesize[v]=1;
	for(auto c:G[v]){
		if(c==p)continue;
		subtreesize[v]+=subtreesize[c];
	}	
}
struct UnionFind {
	vector<int> par;
	UnionFind(int n):par(n){
		rep(0,i,n)par[i]=i;
	}
	int root(int x){
		if (par[x]==x)return x;
		return par[x]=root(par[x]);
	}
	void unite(int x,int y){
		int rx=root(x);
		int ry=root(y);
		if (rx==ry) return; 
		par[rx]=ry;
	}
	bool same(int x,int y){
		int rx=root(x);
		int ry=root(y);
		return rx==ry;
	}
};	
int dijkstraa[214514];
void dijkstra(int n,int m,int c[514514],int d[514514],int l[514514],int siten,bool mukou){
	vector<P> e[214514];
	rep(0,i,m){
		e[c[i]].pb(P{l[i],d[i]});
		if(mukou)e[d[i]].pb(P{l[i],c[i]});
	}
	rep(0,i,n)dijkstraa[i]=inf;
	dijkstraa[siten]=0;
	priority_queue<P,vector<P>,greater<P>>pp;
	pp.push(P{0,siten});
	while(!pp.empty()){
		P t=pp.top();pp.pop();
		if(t.first!=dijkstraa[t.second])continue;
		rep(0,i,e[t.s].size()){
			P g=e[t.s][i];
			if(dijkstraa[g.second]>t.first+g.first){
				dijkstraa[g.second]=t.first+g.first;
				pp.push(P{dijkstraa[g.second],g.second});				
			}	
		}
	}
}
int dijkstra2(int shuten){
	return dijkstraa[shuten];
}
vector<int> toposo(vector<vector<int>> G,vector<int> indegree,int n){
	vector<int> sorted_vertices;
	queue<int> que;
	rep(0,i,n)if(!indegree[i])que.push(i);
	while(!que.empty()){
		int v=que.front();
		que.pop();
		rep(0,i,G[v].size()){
			int u=G[v][i];
			indegree[u]-=1;
			if(!indegree[u])que.push(u);
		}
		sorted_vertices.pb(v);
	}
	return sorted_vertices;
}
struct segtree{
	vector<int> dat;
	int n;
	segtree(int n_):n(),dat(n_*4,inf){
		int x=1;
		while(n_>=x)x*=2;
		n=x;
	}
	void update(int i,int x){
		i+=n-1;
		dat[i]=x;
		while(i>0){
			i=(i-1)/2;
			dat[i]=min(dat[i*2+1],dat[i*2+2]);
		}
	}
	int query(int a,int b){return query_sub(a,b,0,0,n);}
	int query_sub(int a,int b,int k,int l,int r){
		if(r<=a||b<=l)return inf;
		else if(a<=l&&r<=b)return dat[k];
		else{
			int vl=query_sub(a,b,k*2+1,l,(l+r)/2);
			int vr=query_sub(a,b,k*2+2,(l+r)/2,r);
			return min(vl,vr);
		}
	}
	int rightest(int a,int b,int x){return rightest_sub(a,b,x,0,0,n);}
	int rightest_sub(int a,int b,int x,int k,int l,int r){
		if(dat[k]>x||r<=a||b<=l)return a-1;
		else if(k>=n-1)return k-(n-1);
		else{
			int vr=rightest_sub(a,b,x,2*k+2,(l+r)/2,r);
			if(vr!=a-1)return vr;
			else return rightest_sub(a,b,x,2*k+1,l,(l+r)/2);
		}	
	}
	int leftest(int a,int b,int x){return leftest_sub(a,b,x,0,0,n);}
	int leftest_sub(int a,int b,int x,int k,int l,int r){
		if(dat[k]>x||r<=a||b<=l)return b;
		else if(k>=n-1)return k-(n-1);
		else{
			int vl=leftest_sub(a,b,x,2*k+1,l,(l+r)/2);
			if(vl!=b)return vl;
			else return leftest_sub(a,b,x,2*k+2,(l+r)/2,r);
		}	
	}
};
signed main(){
	ic(y) ic(n) ic(d)
	int a1=0,a2=0;
	a2=min(n,365-d);
	a1=max(0,a2-d);
	cout<<a1<<" "<<a2<<endl;
}
0