| Task: | Family reunion |
| Sender: | grikukan |
| Submission time: | 2017-01-21 20:13:38 +0200 |
| Language: | C++ |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | UNKNOWN | 0 |
| #2 | UNKNOWN | 0 |
| #3 | UNKNOWN | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | UNKNOWN | -- | 1 | details |
| #2 | UNKNOWN | -- | 2 | details |
| #3 | UNKNOWN | -- | 3 | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:27:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &x);
^
input/code.cpp:30:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &a[i], &b[i]);
^Code
/*
СТРОИМ СТЕНУ РАБОТЯГИ!
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
█═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█
█═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█
█═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█
█═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█
█═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█
█═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█
█═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█
█═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int dp[1007];
int a[1007], b[1007];
int main()
{
#ifdef LOCAL
freopen("input.txt", "r", stdin);
#endif
int n, x;
scanf("%d %d", &n, &x);
for (int i= 1;i <= n; i++)
{
scanf("%d %d", &a[i], &b[i]);
}
int res =0;
for (int i= 1;i <= n; i++)
{
for (int j =1;j<=n;j++)
{
if (a[i] + a[j] <= x) res = max(res, b[i] + b[j]);
}
}
printf("%d\n", res);
}
Test details
Test 1
Group: 1
Verdict: UNKNOWN
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| (not available) |
Test 2
Group: 2
Verdict: UNKNOWN
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| (not available) |
Test 3
Group: 3
Verdict: UNKNOWN
| input |
|---|
| #!/bin/bash set -e OFFSET=$(grep -onam1 '^__DATA_... |
| correct output |
|---|
| 50 |
| user output |
|---|
| (not available) |
