結果

問題 No.1236 長針と短針
ユーザー 沙耶花沙耶花
提出日時 2020-09-25 22:19:33
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 635 bytes
コンパイル時間 2,147 ms
コンパイル使用メモリ 204,400 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-10 15:33:58
合計ジャッジ時間 3,176 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000000



int main(){

	vector<vector<int>> t = {{0,0,0},{1,5,27},{2,10,54},{3,16,21},{4,21,49},{5,27,16},{6,32,43},{7,38,10},{8,43,38},{9,49,5},{10,54,32}};
	
	vector<int> S;
	
	rep(i,t.size()*10){
		S.push_back(t[i%11][0]*3600+t[i%11][1]*60+t[i%11][2]);
		rep(j,i/11){
			S.back() += 3600 * 12;
		}
	}
	
	rep(i,S.size()){
		//cout<<S[i]<<endl;
	}
	
	int A,B;
	cin>>A>>B;
	int C = B*60 + A*3600;
	
	int x = *lower_bound(S.begin(),S.end(),C);
	
	cout<<x - C<<endl;;
	
	return 0;
}
0