1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

競プロ日記#25/04/30

Posted at

アルゴ式-接線の傾き (1)

  • 接戦の傾きの定義から
int main() {
    int a,b,c,k;
    cin >> a >> b >> c >> k;
    cout << (2 * a * k) + b << endl;
}

アルゴ式-接線の傾き (2)

  • 2項係数を使うとNK^N-1だけ残ることに気付けるかどうか
  • long long にしないと


using Graph = vector<vector<int>>;

int main() {
    int N,k;
    cin >> N >> k;
    long long ans = N * pow(k,N-1);
    cout << ans << endl;
}

アルゴ式-導関数

  • 導関数を求める
  • 無性に数3やりたくなる
int main() {
    int N;
    cin >> N;
    for (int i = 0; i <= N; i++) {\
        int a;
        cin >> a;
        if (i == 0){
            continue;
        }
        cout << a * i << " ";
    }
    cout << endl;
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?