Mã chấm: 99242
Main.cc: In function ‘void MaxDiem(int*, int, int)’: Main.cc:40:34: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive] tong = tong + Max(a[k - 1],n); ~~~~~~~^ Main.cc:12:5: note: initializing argument 1 of ‘int Max(int*, int)’ int Max(int a[],int n) ^~~ Main.cc: In function ‘int main()’: Main.cc:47:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d",&n,&k); ~~~~~^~~~~~~~~~~~~~~ Main.cc:51:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a[i]); ~~~~~^~~~~~~~~~~~