結果
| 問題 | No.3677 Global Checksum |
| コンテスト | |
| ユーザー |
あいすあうと
|
| 提出日時 | 2026-09-05 00:11:45 |
| 言語 | C++23(gnu拡張gcc16) (gcc 16.1.0 + boost 1.92.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 4,985 bytes |
| 記録 | |
| コンパイル時間 | 7,407 ms |
| コンパイル使用メモリ | 390,960 KB |
| 実行使用メモリ | 9,720 KB |
| 最終ジャッジ日時 | 2026-09-05 00:11:56 |
| 合計ジャッジ時間 | 9,117 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 TLE * 1 -- * 7 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:225:14: warning: 'a' may be used uninitialized [-Wmaybe-uninitialized]
225 | t+=a;
| ~^~~
main.cpp:223:17: note: 'a' was declared here
223 | ull a;
| ^
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll=long long;
using ull=unsigned long long;
using ld=long double;
using i128=__int128;
using P=pair<ll,ll>;
template<typename T> using vc=vector<T>;
template<typename T> using vv=vc<vc<T>>;
using vl=vc<ll>;
using vvl=vc<vc<ll>>;
using vul=vc<ull>;
using vs=vc<string>;
using vb=vc<bool>;
#define rep(i,s,n) for(ll i=s;i<(n);i++)
#define Rep(i,s,n) for(ll i=n;i>=s;i--)
#define nall(x) x.begin(),x.end()
#define rall(a) a.rbegin(),a.rend()
#define pb push_back
#define eb emplace_back
#define pob pop_back
#define nexp(v) next_permutation(v)
#define prep(v) prev_permutation(v)
#define YES cout<<"Yes"<<endl
#define NO cout<<"No"<<endl
#define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define M1 cout<<"-1"<<endl
const long long INF=(1LL<<62)-(1LL<<31)-1;
#define endl '\n'
using mint=modint998244353;
using mint7=modint1000000007;
//vl dx={1,-1,0,0};vl dy={0,0,1,-1};
//vl dx={0,0,1,1,1,-1,-1,-1};vl dy={1,-1,0,1,-1,0,1,-1};
bool out_grid(ll i, ll j, ll h, ll w){return (!(0<=i && i<h && 0<=j && j<w));}
void chmin(ll &a,ll b){if(a>b)a=b;}
void chmax(ll &a,ll b){if(a<b)a=b;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll ceil_div(ll a,ll b){return (a+(b-1))/b;}
namespace fastio{
const int sz=1<<16;
char ibuf[sz],obuf[sz];
int ipos=0,ilen=0,opos=0;
inline int gc(){
if(ipos==ilen){
ilen=::read(0,ibuf,sz);
ipos=0;
if(ilen<=0)return EOF;
}
return (unsigned char)ibuf[ipos++];
}
inline void pc(char c){
if(opos==sz){
::write(1,obuf,opos);
opos=0;
}
obuf[opos++]=c;
}
inline void flush(){
if(opos){
::write(1,obuf,opos);
opos=0;
}
}
template<typename T>
struct unsigned_type{
using type=make_unsigned_t<T>;
};
template<>
struct unsigned_type<__int128>{
using type=unsigned __int128;
};
template<>
struct unsigned_type<unsigned __int128>{
using type=unsigned __int128;
};
template<typename T>
using unsigned_type_t=typename unsigned_type<T>::type;
template<typename T>
bool read(T &x){
int c=gc();
while(c!=EOF && c!='-' && (c<'0' || '9'<c))c=gc();
if(c==EOF)return false;
bool neg=false;
if(c=='-'){
neg=true;
c=gc();
}
using U=unsigned_type_t<T>;
U y=0;
while('0'<=c && c<='9'){
y=y*10+(c-'0');
c=gc();
}
if constexpr(is_same_v<T,__int128>){
if(neg){
if(y==0)x=0;
else x=-(__int128)(y-1)-1;
}else{
x=(__int128)y;
}
}else if constexpr(is_signed_v<T>){
if(neg){
if(y==0)x=0;
else x=-T(y-1)-1;
}else{
x=T(y);
}
}else{
x=T(y);
}
return true;
}
bool read(string &s){
int c=gc();
while(c!=EOF && c<=' ')c=gc();
if(c==EOF)return false;
s.clear();
while(c!=EOF && c>' '){
s+=char(c);
c=gc();
}
return true;
}
bool read(char &c){
int x=gc();
while(x!=EOF && x<=' ')x=gc();
if(x==EOF)return false;
c=char(x);
return true;
}
template<typename T,typename... Ts>
bool read(T &x,Ts&... xs){
if(!read(x))return false;
if constexpr(sizeof...(xs))return read(xs...);
return true;
}
template<typename T>
void write(T x,char end='\n'){
using U=unsigned_type_t<T>;
U y;
if constexpr(is_same_v<T,__int128>){
if(x<0){
pc('-');
y=U(0)-U(x);
}else{
y=U(x);
}
}else if constexpr(is_signed_v<T>){
if(x<0){
pc('-');
y=U(0)-U(x);
}else{
y=U(x);
}
}else{
y=U(x);
}
char s[64];
int n=0;
do{
s[n++]=char('0'+y%10);
y/=10;
}while(y);
while(n)pc(s[--n]);
if(end)pc(end);
}
void write(const string &s,char end='\n'){
for(char c:s)pc(c);
if(end)pc(end);
}
void write(const char *s,char end='\n'){
while(*s)pc(*s++);
if(end)pc(end);
}
struct Flusher{
~Flusher(){
flush();
}
}flusher;
}
using fastio::read;
using fastio::write;
int main(){
ll h,w;
read(h,w);
vc<uint32_t> s(h);
uint32_t t=0;
rep(i,0,h){
rep(j,0,w){
ull a;
read(a);
t+=a;
s[i]+=a;
}
}
rep(i,0,h)write(s[i]+t);
}
あいすあうと