Submission #172422
Source Code Expand
Copy
#include <iostream> #include <vector> #include <algorithm> using namespace std; int MaxTako(vector<vector<int>> table,int d){ vector<int> ablepos; for(int i=0;i<table.size();i++){ for(int j=0;j<table[0].size();j++){ if(i+j>d) continue; if(d%2){ if(i%2==j%2) continue; }else{ if(i%2!=j%2) continue; } ablepos.push_back(table[i][j]); } } return *max_element(ablepos.begin(),ablepos.end()); } int main(){ int row,col,d; cin>>row>>col>>d; vector<vector<int>> table(row,vector<int>(col)); for(int i=0;i<row;i++){ for(int j=0;j<col;j++){ cin>>table[i][j]; } } cout<<MaxTako(table,d)<<endl; }
Submission Info
Submission Time | |
---|---|
Task | B - 謎の人物X |
User | terakun |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 709 Byte |
Status | CE |
Compile Error
./Main.cpp:6:30: error: ‘>>’ should be ‘> >’ within a nested template argument list ./Main.cpp: In function ‘int main()’: ./Main.cpp:24:20: error: ‘>>’ should be ‘> >’ within a nested template argument list