結果
| 問題 | No.481 1から10 |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-02-11 02:34:59 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 457µs | |
| コード長 | 651 bytes |
| 記録 | |
| コンパイル時間 | 2,024 ms |
| コンパイル使用メモリ | 337,500 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-21 06:37:18 |
| 合計ジャッジ時間 | 3,208 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
コンパイルメッセージ
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc@15/15.3.0/include/c++/15/bits/unique_ptr.h:42,
from /home/linuxbrew/.linuxbrew/Cellar/gcc@15/15.3.0/include/c++/15/memory:80,
from /home/linuxbrew/.linuxbrew/Cellar/gcc@15/15.3.0/include/c++/15/x86_64-pc-linux-gnu/bits/stdc++.h:58,
from main.cpp:1:
In member function 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>]',
inlined from 'void solve()' at main.cpp:32:7:
/home/linuxbrew/.linuxbrew/Cellar/gcc@15/15.3.0/include/c++/15/bits/ostream.h:212:25: warning: 'n' may be used uninitialized [-Wmaybe-uninitialized]
212 | { return _M_insert(__n); }
| ~~~~~~~~~^~~~~
main.cpp: In function 'void solve()':
main.cpp:21:5: note: 'n' was declared here
21 | int n;
| ^
ソースコード
#include<bits/stdc++.h>
#include<map>
using namespace std;
#define int long long
#define forn(i, a, b) for (int i = a; i < b; i++)
#define vect vector<int>
#define srt(vec) sort(vec.begin(),vec.end())
bool prime(int a)
{
if(a<=1||a%2==0||a%3==0)return 0;
for(int j=5; j*j<=a; j+=6) {
int k=j+2;
if(a%j==0||a%k==0)return 0;
}
return 1;
}
const int N=2e7+10;
//vector<int> vec(N);
void solve()
{
int n;
vect vec(9);
for(int &j:vec)
cin>>j;
srt(vec);
forn(j,0,10)
{
if(vec[j]!=j+1)
{n=j+1;
break;}
}
cout<<n<<endl;
}
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
//cin >> t;;
while (t--)
solve();
return 0;
}
vjudge1