提出 #39410201


ソースコード 拡げる

/*
                       _oo0oo_ 
                      o8888888o 
                      88" . "88 
                      (| -_- |) 
                      0\  =  /0 
                    ___/`---'\___ 
                  .' \\|     |// '. 
                 / \\|||  :  |||// \ 
                / _||||| -:- |||||- \ 
               |   | \\\  -  /// |   | 
               | \_|  ''\---/''  |_/ | 
               \  .-\__  '-'  ___/-. / 
             ___'. .'  /--.--\  `. .'___ 
          ."" '<  `.___\_<|>_/___.' >' "". 
         | | :  `- \`.;`\ _ /`;.`/ - ` : | | 
         \  \ `_.   \_ __\ /__ _/   .-` /  / 
     =====`-.____`.___ \_____/___.-`___.-'===== 
                       `=---=' 
 
*/
// **************************************************************************** //
//                                                                              //
//                                                         :::      ::::::::    //
//                                              :+:      :+:    :+: //
//                                                     +:+ +:+         +:+      //
//            +//+  +:+            +//+             //
//                                                 +//+//+//+//+//+   +//+      //
//                                      //+//    //+//          //
//                                                     //#   ########.fr        //
//                                                                              //
// **************************************************************************** //




#include <bits/stdc++.h> 
using namespace std; 
//#define s(n)                        scanf("%d",&n) 
#define s2(a,b)                      scanf("%d%d",&a,&b) 
#define s3(a,b,c)                    scanf("%d%d%d",&a,&b,&c) 
#define sc(n)                       scanf("%c",&n) 
#define sl(n)                       scanf("%I64d",&n) 
#define sf(n)                        
//----------------------------------------------- --------------------------------------------
#include <iostream> 
#include <sstream> 
#include <cstdio> 
#include <cmath> 
#include <cstring> 
#include <cctype> 
#include <string> 
#include <vector> 
#include <list> 
#include <set> 
#include <map> 
#include <queue> 
#include <stack> 
#include <algorithm> 
#include <functional> 
using namespace std;  
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
using str = string;
using pi = pair<int,int>;
using pl = pair<ll,ll>;
using pd = pair<db,db>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = vector<db>;
using vs = vector<str>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
#define tcT template<class T
#define tcTU tcT, class U
tcT> using V = vector<T>;
tcT, size_t SZ> using AR = array<T,SZ>;
tcT> using PR = pair<T,T>;
#define sz(x) int((x).size())
#define bg(x) begin(x)
#define all(x) bg(x), end(x)
#define rall(x) x.rbegin(), x.rend()
#define sor(x) sort(all(x))
#define rsz resize
#define ins insert
#define ft front()
#define bk back()
#define pb push_back
#define eb emplace_back
#define pf push_front
#define lb lower_bound
#define ub upper_bound
#define FOR(i,a,b) for (int (i) = (a); (i) < (b); ++(i))
#define REP(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int (i) = (b)-1; (i) >= (a); --(i))
#define PER(i,a) ROF(i,0,a)
#define rep(a) REP(_,a)
#define each(a,x) for (auto& a: x)
ll gcd(ll a, ll b){if (b == 0)return a;return gcd(b, a % b);} //__gcd 
ll lcm(ll a, ll b){return (a/gcd(a,b)*b);}
ll moduloMultiplication(ll a,ll b,ll mod){ll res = 0;a %= mod;while (b){if (b & 1)res = (res + a) % mod;b >>= 1;}return res;}
ll powermod(ll x, ll y, ll p){ll res = 1;x = x % p;if (x == 0) return 0;while (y > 0){if (y & 1)res = (res*x) % p;y = y>>1;x = (x*x) % p;}return res;}
bool isPrime(ll n){if(n<=1)return false;if(n<=3)return true;if(n%2==0||n%3==0)return false;for(int i=5;i*i<=n;i=i+6)if(n%i==0||n%(i+2)==0)return false;return true;}
bool isPowerOfTwo(int n){if(n==0)return false;return (ceil(log2(n)) == floor(log2(n)));}
bool isPerfectSquare(ll x){if (x >= 0) {ll sr = sqrt(x);return (sr * sr == x);}return false;}
inline int two(int n) { return 1 << n; } 
inline int test(int n, int b) { return (n>>b)&1; } 
inline void set_bit(int & n, int b) { n |= two(b); } 
inline void unset_bit(int & n, int b) { n &= ~two(b); } 
inline int last_bit(int n) { return n & (-n); } 
inline int ones(int n) { int res = 0; while(n && ++res) n-=n&(-n); return res; } 
template<class T> void chmax(T & a, const T & b) { a = max(a, b); } 
template<class T> void chmin(T & a, const T & b) { a = min(a, b); } 
const int MOD = 1e9+7;
const int MX = 2e5+5;
const ll INF = 1e18;
const db PI = acos((db)-1);
const int dx[4] = {1,0,-1,0}, dy[4] = {0,1,0,-1};   // for every grid problem
tcT> bool ckmin(T& a, const T& b) {
    return b < a ? a = b, 1 : 0; } // set a = min(a,b)
tcT> bool ckmax(T& a, const T& b) {
    return a < b ? a = b, 1 : 0; }
tcT> void remDup(vector<T>& v) { // sort and remove duplicates
    sort(all(v)); v.erase(unique(all(v)),end(v)); }
// Some Codes Skipped
inline namespace FileIO {
    void setIn(str s) {freopen(s.c_str(),"r",stdin);}
    void setOut(str s) {freopen(s.c_str(),"w",stdout);}
    void setIO(str s = "") {
        cin.tie(0)->sync_with_stdio(0); // unsync C / C++ I/O streams
        // cin.exceptions(cin.failbit);
        // throws exception when do smth illegal
        // ex. try to read letter into int
        if (sz(s)) setIn(s+".in"), setOut(s+".out");    // for old USACO
    }
}
#define Code ios_base::sync_with_stdio(false);
#define By cin.tie(NULL);
#define Sudhir cout.tie(NULL);
#define vll           vector<long long int>
const int NUM = 31;
#define int long long
#define intd long double
#define pi 3.141592653589793238
#define ff first
#define ss second
#define umap unordered_map<int, int>
#define vi vector<int>
#define pii pair<int, int>
#define all1(v) (v).begin(),(v).end()
#define allr(v) (v).rbegin(),(v).rend()
#define allr1(v) (v).rbegin()+1,(v).rend()
#define sort0(v) sort(all(v))
#define setBits(x) __builtin_popcount(x)
#define pb push_back
#define ppb pop_back
#define prec(n) fixed<<setprecision(n)
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> > #define ini(a, i) memset(a, i, sizeof(a))
// #define lb lower_bound #define ub upper_bound
#define py cout<<"YES\n"; #define pm cout<<"-1\n";
#define pn cout<<"NO\n"; #define ASCII_SIZE 256
#define pb push_back 
#define fr(a,b) for(int i = a; i < b; i++)
#define mod 1000000007 #define inf (1LL<<60) #define prDouble(x) cout << fixed << setprecision(10) << x #define triplet pair<ll,pair<ll,ll>>
#define echo(p) cout << p <<endl;
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL)
#define read(x) int x; cin >> x;
#define reads(x) string x; cin >> x;
using namespace std;
void init_code(){
    fast_io;
    #ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    #endif 
}

void solvve(){

reads(s1)
transform(s1.begin(), s1.end(), s1.begin(), ::toupper);
    cout<<s1<<endl;



}

signed main()
{
    init_code();
    // read(t)
     // while (t--) {
   solvve();

//    cout<<endl;
  
  return 0;
}


提出情報

提出日時
問題 A - CAPS LOCK
ユーザ Sudhir87
言語 C++ (GCC 9.2.1)
得点 100
コード長 7450 Byte
結果 AC
実行時間 8 ms
メモリ 3660 KiB

コンパイルエラー

./Main.cpp: In function ‘void FileIO::setIn(str)’:
./Main.cpp:131:31: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  131 |     void setIn(str s) {freopen(s.c_str(),"r",stdin);}
      |                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
./Main.cpp: In function ‘void FileIO::setOut(str)’:
./Main.cpp:132:32: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  132 |     void setOut(str s) {freopen(s.c_str(),"w",stdout);}
      |                         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 11
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_small_00.txt, 01_small_01.txt, 01_small_02.txt, 02_large_00.txt, 02_large_01.txt, 02_large_02.txt, 03_same_00.txt, 03_same_01.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 8 ms 3468 KiB
00_sample_01.txt AC 6 ms 3592 KiB
00_sample_02.txt AC 3 ms 3560 KiB
01_small_00.txt AC 3 ms 3660 KiB
01_small_01.txt AC 3 ms 3520 KiB
01_small_02.txt AC 2 ms 3556 KiB
02_large_00.txt AC 3 ms 3456 KiB
02_large_01.txt AC 2 ms 3556 KiB
02_large_02.txt AC 2 ms 3592 KiB
03_same_00.txt AC 2 ms 3456 KiB
03_same_01.txt AC 2 ms 3488 KiB