結果

問題 No.1491 銀将
ユーザー lolklolk
提出日時 2021-04-30 22:02:10
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 1,422 bytes
コンパイル時間 6,006 ms
コンパイル使用メモリ 96,816 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-26 06:06:07
合計ジャッジ時間 1,788 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,384 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 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,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>

using namespace std;

#define all( v )        begin( v ), end( v )
#define rep( i, j )     for ( int i = 0; i < (int)j; ++i )
#define rep2( i, j, k ) for ( int i = j; i <= (int)k; ++i )
#define rep3( i, j, k ) for ( int i = j; i >= (int)k; --i )

template < class T > using pq  = priority_queue< T >;
template < class T > using pqg = priority_queue< T, vector< T >, greater< T > >;
template < class S, class T > inline bool chmax( S& x, T y ) {
  if ( x < y ) {
    x = y;
    return true;
  }
  return false;
}

template < class S, class T > inline bool chmin( S& x, T y ) {
  if ( x > y ) {
    x = y;
    return true;
  }
  return false;
}

using ld  = long double;
using ll  = long long;
using pi  = pair< int, int >;
using pl  = pair< ll, ll >;
using vi  = vector< int >;
using vl  = vector< ll >;
using vpi = vector< pi >;
using vpl = vector< pl >;
using vvi = vector< vi >;
using vvl = vector< vl >;

const ll INFLL = 100000000000000000;
const ll INF   = 1000000000;
const ll MAX   = 500005;
const ll MOD   = 1000000007;
// const ll MOD = 998244353;

int main( void ) {
  ios::sync_with_stdio( 0 );
  cin.tie( 0 );
  cout << fixed << setprecision( 15 );

  ll n;
  cin >> n;

  cout << 6 + 4 * ( n * n - 1 ) << endl;

  return ( 0 );
}
0