Submit solution
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch
Points:
0.01 (partial)
Time limit:
1.0s
Memory limit:
512M
Input:
stdin
Output:
stdout
Problem source:
Problem type
Allowed languages
Cho ~2~ số nguyên ~A~ và ~B~. Hãy tính ~A + B~.
Input
Gồm ~1~ dòng chứa ~2~ số nguyên ~A~ và ~B~ ~(1 \le A, B \le 1000)~, cách bởi ~1~ dấu cách.
Output
Ghi ra tổng ~A + B~.
Sample Input
3 4
Sample Output
7
Note
Gợi ý: Sử dụng toán tử "+".
Comments
easy
ghuy4g k76 Hóa 1 THPT chuyên nguyễn huệ hà nội sẽ nhất VOI 25
Khánh Nguyên cute
*code c++ ngắn gọn,đơn giản đảm bảo AC * #include <bits/stdc++.h> using namespace std; int a,b; int main(){ cin>>a>>b; cout<<(a+b); return 0; } ai là wibu giơ tay
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
oke
+1 downvote
Cách giải:
its so hard for me!!!!!!!!!!!!!!!!
This comment is hidden due to too much negative feedback. Show it anyway.
t t t, t hỏi nên npqhungtq2023 trả lời
mình hỏi, sao bạn?
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
bài này các bạn có thể optimize bằng Convex Hull Trick như sau: ta có nhận xét là kết quả của ta sẽ là 1 đt có dạng y = ax+b, nhiệm vụ là tính y tại x = 1, do đó các bạn push đt (a, b) lên cht và get như bth
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
Bài này cho 2 số A và B trên cùng một dòng. Hàm
input()
thì đọc hết nguyên một dòng luôn.Bạn có thể đọc input như sau:
xin 1 upvote
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
công thức quy hoạch động khá đơn giản
include <bits/stdc++.h>
using namespace std; const int N = 1e3 + 1e2; int dp[N][N]; int main() { cin.tie(0)->syncwithstdio(0); dp[1][0] = 1; dp[0][1] = 1; for (int i = 1; i <= 1000; i++) { for (int j = 1; j <= 1000; j++) { dp[i][j] = max({dp[i - 1][j] - (-1), dp[i][j - 1] - (-1), dp[i - 1][j - 1] - (-2)}); } } int a, b; cin >> a >> b; cout << max(dp[a][b], dp[b][a]); return 0; }
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.