제출 #208226

#제출 시각아이디문제언어결과실행 시간메모리
208226jzhBitaro the Brave (JOI19_ho_t1)C++14
0 / 100
5 ms376 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll h,w,i,i1,x,y,sum=0; cin>>h>>w; vector<pair<ll,ll> >v; ll orbs[h],ingots[w]; for (i=0;i<h;i++)orbs[i]=0; for (i=0;i<w;i++)ingots[i]=0; for (i=0;i<h;i++){ for (i1=0;i1<w;i1++){ char c; cin>>c; if (c=='J'){ v.push_back({i1,i}); } else if (c=='O'){ orbs[i]++; } else { ingots[i1]++; } } } for (i=0;i<v.size();i++){ x=v[i].first; y=v[i].second; sum+=ingots[x]*orbs[y]; } cout<<sum<<'\n'; }

컴파일 시 표준 에러 (stderr) 메시지

joi2019_ho_t1.cpp: In function 'int main()':
joi2019_ho_t1.cpp:28:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (i=0;i<v.size();i++){
              ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...