結果

問題 No.3294 UECoder
コンテスト
ユーザー umezo
提出日時 2026-10-24 17:51:20
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 581µs
コード長 542 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,564 ms
コンパイル使用メモリ 331,352 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-10-24 17:51:45
合計ジャッジ時間 4,161 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge6_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:24:28: warning: 'num' may be used uninitialized [-Wmaybe-uninitialized]
   24 |   cout<<"UEC"<<s.substr(num+1)<<endl;
      |                         ~~~^~
main.cpp:20:7: note: 'num' was declared here
   20 |   int num;
      |       ^~~

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n-1);i>=0;i--)
#define ALL(v) v.begin(),v.end()
#define RALL(v) v.rbegin(),v.rend()
template <class T> using V=vector<T>;
template <class T> using VV=V<V<T>>;
using u128=__int128_t;
using ll=long long;
 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  int n;
  string s;
  cin>>n>>s;
  int num;
  rep(i,n){
    if(s[i]=='c') num=i;
  }
  cout<<"UEC"<<s.substr(num+1)<<endl;
    
  return 0;
}
0