結果
問題 |
No.3037 トグルトグルトグル!
|
ユーザー |
![]() |
提出日時 | 2025-02-28 21:32:34 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 2,026 bytes |
コンパイル時間 | 3,128 ms |
コンパイル使用メモリ | 316,776 KB |
実行使用メモリ | 8,608 KB |
最終ジャッジ日時 | 2025-03-07 08:46:38 |
合計ジャッジ時間 | 3,778 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#pragma region header #include <immintrin.h> #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <cfenv> #include <cfloat> #include <chrono> #include <cinttypes> #include <climits> #include <cmath> #include <complex> #include <cstdarg> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <initializer_list> #include <iomanip> #include <ios> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <streambuf> #include <string> #include <tuple> #include <type_traits> #include <typeinfo> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; struct Init{Init(){std::cin.tie(0); ios::sync_with_stdio(false); cout << setprecision(20) << fixed;}} init; using ll = long long; using ull = unsigned long long; using ld = long double; #define all(x) begin((x)), end((x)) #define pb push_back #define mp make_pair #define mt make_tuple #define uq(v) v.erase(unique(begin(v), end(v)), end(v)) template<class T> using pq = priority_queue<T>; template<class T> using pq_g = priority_queue<T, vector<T>, greater<T>>; template<class T> bool chmax(T &a, const T &b){if(a < b){a = b; return 1; } return 0;} template<class T> bool chmin(T &a, const T &b){if(a > b){a = b; return 1; } return 0;} constexpr ll INF = 2e18; constexpr int inf = 1e9; constexpr ld eps = 1e-15; constexpr int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1}; constexpr int dy[8] = {0, 1 ,0, -1, 1, -1, 1, -1}; #pragma endregion header int main(){ ll N; cin >> N; ll ok = 0, ng = 1e9 + 1; while(ng - ok > 1){ ll mid = (ok + ng) / 2; if(mid * mid <= N) ok = mid; else ng = mid; } cout << ok << "\n"; }