QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#454365 | #8519. Radars | YeongTree | Compile Error | / | / | C++14 | 1.3kb | 2024-06-24 20:23:01 | 2024-06-24 20:23:01 |
Judging History
This is the latest submission verdict.
- [2024-06-24 20:23:01]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-06-24 20:23:01]
- Submitted
answer
#include <bits/stdc++.h>
#define pii pair<int, int>
#define pll pair<long long, long long>
#define piii pair<int, pii>
#define plll pair<long long, pll>
#define tiii array<int, 3>
#define tiiii array<int, 4>
#define ff first
#define ss second
#define ee ss.ff
#define rr ss.ss
typedef long long ll;
const int INF = (int)1e9 + 7;
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int T; cin >> T;
while(T--)
{
int n; cin >> n;
int m = n / 2;
int A[n][n];
for(int i = 0; i < n; ++i) for(int j = 0; j < n; ++j) cin >> A[i][j];
ll a, b, c, d, e, f, g, h, i;
a = b = c = d = e = f = g = h = INF;
i = A[m][m];
for(int i = 0; i <= m; ++i) for(int j = 0; j <= m; ++j) a = min(a, A[i][j]);
for(int i = 0; i <= m; ++i) for(int j = m; j < n; ++j) b = min(b, A[i][j]);
for(int i = m; i < n; ++i) for(int j = 0; j <= m; ++j) c = min(c, A[i][j]);
for(int i = m; i < n; ++i) for(int j = m; j < n; ++j) d = min(d, A[i][j]);
for(int i = 0; i <= m; ++i) e = min(e, A[i][m]);
for(int i = 0; i <= m; ++i) f = min(f, A[m][i]);
for(int i = m; i < n; ++i) g = min(g, A[i][m]);
for(int i = m; i < n; ++i) h = min(h, A[m][i]);
cout << min({ a + b + c + d, e + c + d, f + b + d, g + a + b, h + a + c, e + g, f + h, i }) << '\n';
}
}
詳細信息
answer.code: In function ‘int main()’: answer.code:32:80: error: no matching function for call to ‘min(ll&, int&)’ 32 | for(int i = 0; i <= m; ++i) for(int j = 0; j <= m; ++j) a = min(a, A[i][j]); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/13/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:1: /usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’ 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: answer.code:32:80: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) 32 | for(int i = 0; i <= m; ++i) for(int j = 0; j <= m; ++j) a = min(a, A[i][j]); | ~~~^~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’ 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed: answer.code:32:80: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) 32 | for(int i = 0; i <= m; ++i) for(int j = 0; j <= m; ++j) a = min(a, A[i][j]); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/13/algorithm:61: /usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)’ 5775 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/13/bits/stl_algo.h:5775:5: note: template argument deduction/substitution failed: answer.code:32:80: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long long int’ 32 | for(int i = 0; i <= m; ++i) for(int j = 0; j <= m; ++j) a = min(a, A[i][j]); | ~~~^~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algo.h:5785:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)’ 5785 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algo.h:5785:5: note: template argument deduction/substitution failed: answer.code:32:80: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long long int’ 32 | for(int i = 0; i <= m; ++i) for(int j = 0; j <= m; ++j) a = min(a, A[i][j]); | ~~~^~~~~~~~~~~~ answer.code:33:79: error: no matching function for call to ‘min(ll&, int&)’ 33 | for(int i = 0; i <= m; ++i) for(int j = m; j < n; ++j) b = min(b, A[i][j]); | ~~~^~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’ 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: answer.code:33:79: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) 33 | for(int i = 0; i <= m; ++i) for(int j = m; j < n; ++j) b = min(b, A[i][j]); | ~~~^~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’ 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed: answer.code:33:79: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) 33 | for(int i = 0; i <= m; ++i) for(int j = m; j < n; ++j) b = min(b, A[i][j]); | ~~~^~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)’ 5775 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/13/bits/stl_algo.h:5775:5: note: template argument deduction/substitution failed: answer.code:33:79: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long long int’ 33 | for(int i = 0; i <= m;...